Update combobox and subform after new record added
Hello,
I'm having two separate issues with updating a form/subform.
First, I have a combobox on my main form, that is populated with client names.
I have a button on this form, that opens a form where I can create new clients.
When I close this form, I want the combobox to reflect the newly created client immediately. Right now I have to close and re-open the client form before it's updated.
I'm using Forms![frmMain]!cboClient.Requery on a button that closes the 'create new client' formcmdSaveClose_Click()
What am I doing wrong here?
Second, and somewhat similar...
I have a subform on this form that contains 0 to many (in datasheet format) 'order' records associated with the current client that is selected.
I have a button on my main form that opens a form and allows me to enter new 'orders' for this client. When I close this form, I want the subform to show any new records. But I have to move off this client, and back to this client, before the subform updates.
For this I am using
Forms![frmClient]![frmSub].Requery on the cmdSaveClose_Click() event.
Again - obviously I'm doing something wrong - but can't figure it out.
Thanks in advance! 🙂
Amber