Hi,
This is a Nooby question that's probably been answered before but I can't find reference to it using the search facility, so I apologize if this is a FAQ.
I have two forms (Customers and Contacts). On frmCustomer I have a button (btnManageContacts) which I want to open frmCustContacts and show the contact records for the particular customer.
Private Sub btnManageContacts_Click()
DoCmd.OpenForm "frmCustContacts", , , "CustID ='" & Me!CustID & "'"
End Sub
This works OK and the Contacts form contains only the filtered records.
The problem is that on the Contacts form I have a combo that I want to use to select a contact record, but the combo lists ALL the contacts and not just the filtered ones. I have spent all afternoon piddling around with SQL to bring the combo into line with no success. So I wonder if any of you can put me n the right track, or point me in the direction of some suitable tutorials.
I know this might be easier to execute using a sub-form but the reason for doing it this way is that the same Contacts form will be accessed from other areas.
Thanks
This is a Nooby question that's probably been answered before but I can't find reference to it using the search facility, so I apologize if this is a FAQ.
I have two forms (Customers and Contacts). On frmCustomer I have a button (btnManageContacts) which I want to open frmCustContacts and show the contact records for the particular customer.
Private Sub btnManageContacts_Click()
DoCmd.OpenForm "frmCustContacts", , , "CustID ='" & Me!CustID & "'"
End Sub
This works OK and the Contacts form contains only the filtered records.
The problem is that on the Contacts form I have a combo that I want to use to select a contact record, but the combo lists ALL the contacts and not just the filtered ones. I have spent all afternoon piddling around with SQL to bring the combo into line with no success. So I wonder if any of you can put me n the right track, or point me in the direction of some suitable tutorials.
I know this might be easier to execute using a sub-form but the reason for doing it this way is that the same Contacts form will be accessed from other areas.
Thanks