I have a user entry form in Access 2007 that is causing me difficulty. I am having a problem refreshing the data in a combo box that is based on a query that lists all of the current items in a field in the table on which the form is based. An example of the query is shown below:
SELECT DISTINCT Catalogs.Composer
FROM Catalogs
WHERE (Catalogs.Composer) Is Not Null;
The query shows the list of current unique entries in the Composer field of the Catalogs table. The user can enter a new composer in the list by typing the composer name into the combo box field. The problem is that the new data doesn’t show up in the list until the query runs again. I have tried using the “requery” method in the After Update event to refresh the list, but that doesn’t work.
However, if I use the Home tab in the ribbon and select Refresh (not Refresh All) in the Refresh All dropdown of the Records section, the effect is exactly what I am looking for. The new entry is displayed in the dropdown list and the user is still on the same record. (If Refresh All is used, the first record is displayed instead of the new record.)
How can I produce the same effect in code so that the user doesn’t have to do anything except enter the new data?
Thanks for any help.
SELECT DISTINCT Catalogs.Composer
FROM Catalogs
WHERE (Catalogs.Composer) Is Not Null;
The query shows the list of current unique entries in the Composer field of the Catalogs table. The user can enter a new composer in the list by typing the composer name into the combo box field. The problem is that the new data doesn’t show up in the list until the query runs again. I have tried using the “requery” method in the After Update event to refresh the list, but that doesn’t work.
However, if I use the Home tab in the ribbon and select Refresh (not Refresh All) in the Refresh All dropdown of the Records section, the effect is exactly what I am looking for. The new entry is displayed in the dropdown list and the user is still on the same record. (If Refresh All is used, the first record is displayed instead of the new record.)
How can I produce the same effect in code so that the user doesn’t have to do anything except enter the new data?
Thanks for any help.