Combobox Requery Save Error

Teresa Allen

New member
Local time
Today, 22:42
Joined
Mar 5, 2003
Messages
8
I have been through many of these threads to try to figure this out on my own but I've had no luck. Lot's of combobox question but I couldn't find this one.

I have a training form with a button that will add new employees if the one your trying to enter training on is not in the list (employee table) I have a second form that pops up and the user can add the employee, save and return to the training form to continue to enter training for the new employee. I would like to keep the data in the training form and just requery the employee table combo box. The requery code seems to work (after looking through several messages to find out how to do it) but it won't requery until I save the record on the Training form and I can't save it because it's not in the combobox?

I guess I could just clear the employee name field on the training form when I open the second form but can't figure out how to do that either.

Access comes so easily sometimes but sometimes I need to use a hammer. This is a sledgehammer problem for me.
 
Similar issue

i am also experiencing similar issue. I will be watching this post closely. Somebody, please help us.
 
Teresa, This might help you

Try this for me. Once you add the employee - set focus back to main form "Your_Combo_Control" and on the main form " On Got Focus Event" add following line.

Me.[your_combo_control].Requery

may not work but worth a try.
sa
 
Use the "On Close" event of the add new employees form to requery the combo box. So when you close that form it will cause the combo box to requery the query that your combo box is based on.

Forms.[Name of your form].[name of your control].Requery

This should work.
 
The problem I'm having is that there is data in the combobox on the main form when I open the employee form so when it goes back to the main form it can requery the combobox because it needs to save the record before it requeries.

I've got the requery working it's the saving of the record on the main form I'm having a problem with.

Thanks
 
Hi Teresa,

Were you ever able to figure this out...I know it was a long time ago, but I'm running into the same problem here. "You must save record before requery"

Any help is appreciated.

Thanks,
Full Williams
 

Users who are viewing this thread

Back
Top Bottom