F
Flick Olmsford
I have a Sales Contact database. I am creating a sales record form.
If a customer exists in the client table, some code in the afterupdate event
of the combo box on that form finds the client record and displays his / her
info on that form. This is working.
If the client does not appear in the combo box, I have a command button to
open another form (client form) so that the user can add the new client. In
both the close event for the client form and the click event of a command
button saving the record in the client form I have the following code
If
CurrentProject.AllForms("frm_Client_Contact_All_In_One_Main").IsLoaded Then
Forms![frm_Client_Contact_All_In_One_Main]![cbo_SearchByName].Requery
MsgBox "Requeried", vbOKOnly
End If
I am using Access 2003.
When I add a new record in the client form, I get the requeried message.
But when I go back to the form, the new client appears in the drop down list
in the client form, but the form does not display the record it should have
found. It will display info for all other records in the combo box.
I must close the Sales contact form and reopen it for the new client to not
only appear in the combo box, but also to display on the form when found.
Does anyone know why this would happen?
If a customer exists in the client table, some code in the afterupdate event
of the combo box on that form finds the client record and displays his / her
info on that form. This is working.
If the client does not appear in the combo box, I have a command button to
open another form (client form) so that the user can add the new client. In
both the close event for the client form and the click event of a command
button saving the record in the client form I have the following code
If
CurrentProject.AllForms("frm_Client_Contact_All_In_One_Main").IsLoaded Then
Forms![frm_Client_Contact_All_In_One_Main]![cbo_SearchByName].Requery
MsgBox "Requeried", vbOKOnly
End If
I am using Access 2003.
When I add a new record in the client form, I get the requeried message.
But when I go back to the form, the new client appears in the drop down list
in the client form, but the form does not display the record it should have
found. It will display info for all other records in the combo box.
I must close the Sales contact form and reopen it for the new client to not
only appear in the combo box, but also to display on the form when found.
Does anyone know why this would happen?