Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

referencing a textbox in a combobox query

Status
Not open for further replies.

dpk136

MIS
Jan 15, 2004
335
US
I have a subform that is part of another subform that is part of another subform that is part of a form. on this subform (machines) i have a combobox that looks up the service calls for that particular machine. How would i reference this in the query

frmTabs
--> frmComp
--> frmcompsubtabs
-->frmServiceSub *This is the one that i am working with all the data on.

In frmService sub i have these fields (partial list)
ServiceID (textbox)-hidden
ServiceCalls (combobox) Selects * from servicecall table where ServiceID = the number in the serviceID textbox.

i tried putting in the generic ServiceID=[Forms]![frmServiceSub]![ServiceID] which did not work.

Can anyone help, this is a huge problem for me.

David Kuhn
------------------
 
Nevermind, i figured it out on my own.

SELECT tblServiceCall.ServiceCallID, tblServiceCall.ServiceID, tblServiceCall.Rep, tblServiceCall.ServiceDate, tblServiceCall.ServiceHours, tblServiceCall.ServiceDesc
FROM tblServiceCall
WHERE (((tblServiceCall.ServiceID)=[Forms]![Frmtabs]![frmcomp]![frmcompsubtabs]![frmservicesub]![ServiceID]))
ORDER BY tblServiceCall.ServiceDate DESC;


I just had to reference it through everything. so starting at the top main form and going through all the subforms til i got to the one i needed.

David Kuhn
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top