Hi
I ahve a form with 2 combo boxes related to each other
Client and Site (1 client can have many sites).
In the client combo box I have Notinlist working well and if it is not in the list my message box activates the subclientform where I can add in the new details and also sites at the same time.
I am now having trouble with the Site field. If the client exists but the site does not then I want to simply go through to the subclientform (where site is a subform), add the new site and then go back to quote. The wizard button I have works fine, until I go back to the quote and then the new site does not display in the drop down list until I close the quote form and go back in to the form again...... I dont want to make it as complex as the Notinlist, so any ideas please........
Private Sub Command106_Click()
On Error GoTo Err_Command106_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "SubFormClient"
stLinkCriteria = "[ClientID]=" & Me![cboQclientid]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command106_Click:
Exit Sub
Err_Command106_Click:
MsgBox Err.Description
Resume Exit_Command106_Click
End Sub
I ahve a form with 2 combo boxes related to each other
Client and Site (1 client can have many sites).
In the client combo box I have Notinlist working well and if it is not in the list my message box activates the subclientform where I can add in the new details and also sites at the same time.
I am now having trouble with the Site field. If the client exists but the site does not then I want to simply go through to the subclientform (where site is a subform), add the new site and then go back to quote. The wizard button I have works fine, until I go back to the quote and then the new site does not display in the drop down list until I close the quote form and go back in to the form again...... I dont want to make it as complex as the Notinlist, so any ideas please........
Private Sub Command106_Click()
On Error GoTo Err_Command106_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "SubFormClient"
stLinkCriteria = "[ClientID]=" & Me![cboQclientid]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command106_Click:
Exit Sub
Err_Command106_Click:
MsgBox Err.Description
Resume Exit_Command106_Click
End Sub