David Ball
Registered User.
- Local time
- Tomorrow, 01:07
- Joined
- Aug 9, 2010
- Messages
- 230
Hi,
I have a table that contains just an autonumber ID field and a text field, ModelName, where model names of cars can be entered.
I have a Form where the user can see what models are already in the table and then add new models or edit existing models.
On the form I use a List Box to display the models that are already in the table and then the user can select a command button that opens another Form where new models can be added or existing models edited. (I’m not sure if a list box is the best way of showing the contents of the table but I couldn’t think of a better way. I don’t expect that a large number of models will ever be entered).
The problem is that the new entries don’t appear in the list box until I close the form and then re-open it. I tried to get around this by adding another command button that requeries the list box when selected. This works but I would rather have the new entries appear when the form has a new record entered. This could be triggered by either the form being closed or scrolled to the next record after a new record is entered.
Can this be done and, if so, which event would I put the requery code behind?
Thanks very much
Dave
I have a table that contains just an autonumber ID field and a text field, ModelName, where model names of cars can be entered.
I have a Form where the user can see what models are already in the table and then add new models or edit existing models.
On the form I use a List Box to display the models that are already in the table and then the user can select a command button that opens another Form where new models can be added or existing models edited. (I’m not sure if a list box is the best way of showing the contents of the table but I couldn’t think of a better way. I don’t expect that a large number of models will ever be entered).
The problem is that the new entries don’t appear in the list box until I close the form and then re-open it. I tried to get around this by adding another command button that requeries the list box when selected. This works but I would rather have the new entries appear when the form has a new record entered. This could be triggered by either the form being closed or scrolled to the next record after a new record is entered.
Can this be done and, if so, which event would I put the requery code behind?
Thanks very much
Dave