Refreshing a query from a form.

AnthonyJBaker

New member
Local time
Today, 23:20
Joined
Feb 17, 2011
Messages
5
G'day!

I am currently working on a db to record my Call of Cthulhu cards.

That db has various tables including one for Artists.

There is a query that selects all Artists from that table and sorts them Ascending.

There is a table called CardTable that stores all the data for the card and there is an input form called CardEntryForm to input the data from each card.

That form has a combo box which reads the ArtistsQuery to present a list of artists to select from; if the card has an artist that is not on the list, I have created a button that opens a form called AddArtistForm to enter the new artist's name.

That form simply has a field, linked to the Artist table, and a Close Form button. The form does the data input just fine BUT the combo box doesn't show the new data just entered.

How do I get the combo box ( underlying query?) to refresh? I have been trying to use Me.Requery but I'm either putting it into the wrong Event or field and the combo box data is not updating.:confused:

Any clarification will be greatly appreciated, especially as I once knew how to do this!!!:mad:

Regards

Anthony:cool:
 
In the CardEntryForm form's close event put:

Code:
Forms!YourOtherFormNameHere.YourComboBoxNameHere.Requery
 
Hi Anthony,

Use Me.Refresh on your save,go or close command button then on click it refreshes.

Madeline
 
Sorry - Incorrect Answer

Hi Anthony,

Use Me.Refresh on your save,go or close command button then on click it refreshes.

Madeline

Sorry, but that is INCORRECT Madeline. Refresh only sees changes to records that existed in that original recordset. So adding a record or deleting a record, refresh will not get those changes. To be able to get added records or remove deleted records from the recordset you need to use REQUERY.
 

Users who are viewing this thread

Back
Top Bottom