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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a lookup to other Forms/Queries?

Status
Not open for further replies.

CindiN

Instructor
Jan 30, 2001
98
US
How can I create a text box on a form that will use the result of another text box (on the same form) AND the result of a control (from another form) to look up a query and enter the result from these two other criteria's? Problem is that the query is not the same query used to create the two forms mentioned above.

Form 1 Form 2 Form 2
txtbox A + txtbox B = txtbox C
from Query1 from Query2 from Query3

txtbox A data and txtbox B data are listed in Query 3 also.

Please help, I'm soooo confused!
Thanks,
CindiN

 
Hello.....Please help me on this, I'm getting really desparate for an answer. I don't think it's too complicated, let me know if I need to explain myself better.

Please help!!!!
CindiN
 
You might try something along the lines of:

private sub MyCombo_AfterUpdate
Me.TextBox = dlookup("[FieldToPlaceInTextBox]", "QueryToLookUp", "[Field1] = Forms![Form1]![Control] and [Field2] = Forms![Form2][ControlName]")
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top