R
Ruth
I am building a form with multiple tab controls in Access 2003. Each
control will have a subform linked to the OrgID field that I've hidden
in the form header. I built my subform and used DLookup strings to
populate several fields. When I viewed the subform in form view (prior
to placing on the tab) the DLookups worked. Now they don't. I've added
the subform name to the string, but still no luck. I'm wondering if I
need to reference the tab name as well.
In short, the database tracks visits to organizations. Multiple
contacts work at each organization. I need to be able to select the
contact for each visit from a list. (That part works fine.) The form
shows details for a specific visit.
Here are the details:
Form name: frmVisits
Subform name: frmVisitOrgTab
Tab control namegVisitInfo
Combo Box [ContactID] on subform has the following statement to select
Contacts who work at the Organization we're viewing details for.
SELECT tblContacts.ContID, tblContacts!FName & " " & tblContacts!LName
AS Name, tblOrgs.OrgID FROM tblOrgs INNER JOIN tblContacts ON
tblOrgs.OrgID=tblContacts.OrgID WHERE (((tblOrgs.OrgID)=Forms!
frmVisits![Visit Details].Form!OrgID));
The text values for position titles are stored in the tblTitles while
a title ID# is stored in the tblContacts. I have a text box doing a
lookup for the contact's title. It will return a number which I was
able to use to show the text title in another lookup.
First lookup:
Control Name: txtTitle-LU
Expression: DLookUp("[Title]","tblContacts","[ContID] =" & Forms!
frmVisits!pgVisitInfo!frmVisitOrgTab!ContactID)
This isn't returning anything so my Title lookup isn't working.
But the lookups for phone, e-mail and zip aren't working either.
Sample:
=DLookUp("[Phone]","tblContacts","[ContID] =" & Forms!frmVisitOrgTab!
ContactID)
I've tried adding the name of the tab (may be out of sequence as I
don't even know where to put it) and .Column(0) at the end of the
[ContactID] part of the string.
Can anyone help? I'm really frustrated as it worked perfectly before I
placed the subform on the tab!
Thanks
Ruth
control will have a subform linked to the OrgID field that I've hidden
in the form header. I built my subform and used DLookup strings to
populate several fields. When I viewed the subform in form view (prior
to placing on the tab) the DLookups worked. Now they don't. I've added
the subform name to the string, but still no luck. I'm wondering if I
need to reference the tab name as well.
In short, the database tracks visits to organizations. Multiple
contacts work at each organization. I need to be able to select the
contact for each visit from a list. (That part works fine.) The form
shows details for a specific visit.
Here are the details:
Form name: frmVisits
Subform name: frmVisitOrgTab
Tab control namegVisitInfo
Combo Box [ContactID] on subform has the following statement to select
Contacts who work at the Organization we're viewing details for.
SELECT tblContacts.ContID, tblContacts!FName & " " & tblContacts!LName
AS Name, tblOrgs.OrgID FROM tblOrgs INNER JOIN tblContacts ON
tblOrgs.OrgID=tblContacts.OrgID WHERE (((tblOrgs.OrgID)=Forms!
frmVisits![Visit Details].Form!OrgID));
The text values for position titles are stored in the tblTitles while
a title ID# is stored in the tblContacts. I have a text box doing a
lookup for the contact's title. It will return a number which I was
able to use to show the text title in another lookup.
First lookup:
Control Name: txtTitle-LU
Expression: DLookUp("[Title]","tblContacts","[ContID] =" & Forms!
frmVisits!pgVisitInfo!frmVisitOrgTab!ContactID)
This isn't returning anything so my Title lookup isn't working.
But the lookups for phone, e-mail and zip aren't working either.
Sample:
=DLookUp("[Phone]","tblContacts","[ContID] =" & Forms!frmVisitOrgTab!
ContactID)
I've tried adding the name of the tab (may be out of sequence as I
don't even know where to put it) and .Column(0) at the end of the
[ContactID] part of the string.
Can anyone help? I'm really frustrated as it worked perfectly before I
placed the subform on the tab!
Thanks
Ruth