Hi everyone,
I am getting a really strange error when I try to change the 'Link Child Fields' or 'Link Master Fields' property of a subform. It states:
Quote:
|
quote:Object variable or With block variable not set
|
I have 2 subforms, each nested within the form above it. The top form is frmVendor, the first nested subform is sfrmVenAddr, and the second nested subform is sfrmVenContact.
The forms work together like this: The user chooses a vendor from a combo box [cboSelectVendor]in the top form. This causes the sfrmVenAddr subform to populate with all address locations for that vendor, via a query matched to the [cboSelectVendor].
The user then selects the correct address from another combo box [cboSelectAddr]in the header of sfrmVenAddr, which causes the sfrmVenContact subform to populate will all contacts for that specific address, via another query matched to [cboSelectAddr].
Finally, the user can select a specific contact from a third combo box [cboSelectContact] in the header of sfrmVenContactto, display all of the contact information for that person.
My problem is this. I have a listbox control in sfrmVenContact that is supposed to display all phone numbers for the selected contact, via a query matched to [cboSelectContact]. However, the query doesn't return anything, even though I've modeled it on the two other queries, which both work.
After doing some research, I decided to double-check that all of my subforms were linked correctly via their Link Master / Child fields, but when I clicked the [...] Build button, I got the error message above.
Does anyone have any advice or suggestions? I'm tearing my hair out here...
Here is the query for the phone number listbox.
Code:
SELECT tblVEN_CNTCT_PHN.VEN_CNTCT_PHN_UID,
tblVEN_CNTCT_PHN.VEN_CNTCT_PHN_NUM,
tblVEN_CNTCT_PHN.VEN_CNTCT_PHN_TYPE
FROM tblVEN_CNTCT
INNER JOIN (tblVEN_CNTCT_PHN
INNER JOIN tblVEN_CNTCT_PHN_LOC_REL
ON tblVEN_CNTCT_PHN.VEN_CNTCT_PHN_UID = tblVEN_CNTCT_PHN_LOC_REL.VEN_CNTCT_PHN_UID)
ON tblVEN_CNTCT.VEN_CNTCT_UID = tblVEN_CNTCT_PHN_LOC_REL.VEN_CNTCT_UID
WHERE (((tblVEN_CNTCT_PHN_LOC_REL.VEN_CNTCT_UID)=[Forms]![frmVendor]![sfrmVenAddr].[Form]![sfrmVenCntct].[Form]![cboSelect_Contact]));
And here are some screen captures of the database itself...
http://home.mn.rr.com/jbarker2/screenshot1.gif
http://home.mn.rr.com/jbarker2/screenshot2.gif
http://home.mn.rr.com/jbarker2/screenshot3.gif
http://home.mn.rr.com/jbarker2/screenshot4.gif
http://home.mn.rr.com/jbarker2/screenshot5.gif
Thanks everyone.... PLEASE HELP!!!
JackNimble