DlooooooooooooooooooooooooookUP!!!!!!!!!1111

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Could any body tell me what should i write in the controlsource of a text
box on a form to disply the route of the agent that fits the textbox [Agent]
on my single form.The table looks like this :
Agent Skills route
John TSLM R1
Mary PA\VLK R2
Peter TSLM R3

I'd like to do The same for the skills
 
Pietro said:
Could any body tell me what should i write in the controlsource of
a text box on a form to disply the route of the agent that fits the
textbox [Agent] on my single form.The table looks like this :
Agent Skills route
John TSLM R1
Mary PA\VLK R2
Peter TSLM R3

I'd like to do The same for the skills

=DLookup("route", "TableName", "Agent = '" & Me!Agent & "'")
 
Thank you ver much Richard,
Could i know why did you use '" & and & "'"
thank yopu
i appreciate that any body give me abreifing about how to use these signs

Rick Brandt said:
Pietro said:
Could any body tell me what should i write in the controlsource of
a text box on a form to disply the route of the agent that fits the
textbox [Agent] on my single form.The table looks like this :
Agent Skills route
John TSLM R1
Mary PA\VLK R2
Peter TSLM R3

I'd like to do The same for the skills

=DLookup("route", "TableName", "Agent = '" & Me!Agent & "'")
 
Pietro said:
Thank you ver much Richard,
Could i know why did you use '" & and & "'"
thank yopu
i appreciate that any body give me abreifing about how to use these
signs

Because the value of Agent is a string it needs to be delimited with quotes.
Since the WHERE argument itself is inside double quotes I used single quotes
inside of that.

If the WHERE value had been a date I would have needed to delimit with # symbols
and if it had been a number I wouldn't have needed to delimit it at all.
 
Back
Top