J
J. B.
Hey all,
I am trying to accomplish opening 2 forms at the same time (One form is data
entry form for Calls and the other form contains a contact list box). The
way it is setup is that the data entry form called frmDataEntryCall would be
open and when the user selects a Customer from the combo box (named CustID)
on frmDataEntryCall the second form, frmContactList, would open having the
same Customer in the unbound combobox; which would produce the list of
contacts in the list box. I have code attached to the AfterUpdate Event
combo
box on the frmDataEntry. When I select a Customer on the frmDataEntryCall
form I receive the message: "Enter parameter value for Customers"
Customers is the unbound combo box.
The frmContactList works perfect by itself. I have even watched (Stoped
during runtime) the code and the variable stLinkCriteria (as seen below) has
the value of "Customers=3" (Assuming I selected the third customer in CustID
combo box)
Here is the code I have:
Private Sub CustID_AfterUpdate()
Me!ContactID.Requery
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContactList"
stLinkCriteria = "[Customers]=" & Me![CustID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
I hope I have provided enough information. Sorry for being so long. Any
help would be greatly appreciated.
Thanks in advance,
J. B.
I am trying to accomplish opening 2 forms at the same time (One form is data
entry form for Calls and the other form contains a contact list box). The
way it is setup is that the data entry form called frmDataEntryCall would be
open and when the user selects a Customer from the combo box (named CustID)
on frmDataEntryCall the second form, frmContactList, would open having the
same Customer in the unbound combobox; which would produce the list of
contacts in the list box. I have code attached to the AfterUpdate Event
combo
box on the frmDataEntry. When I select a Customer on the frmDataEntryCall
form I receive the message: "Enter parameter value for Customers"
Customers is the unbound combo box.
The frmContactList works perfect by itself. I have even watched (Stoped
during runtime) the code and the variable stLinkCriteria (as seen below) has
the value of "Customers=3" (Assuming I selected the third customer in CustID
combo box)
Here is the code I have:
Private Sub CustID_AfterUpdate()
Me!ContactID.Requery
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmContactList"
stLinkCriteria = "[Customers]=" & Me![CustID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
I hope I have provided enough information. Sorry for being so long. Any
help would be greatly appreciated.
Thanks in advance,
J. B.