MS Access: Search data from a Text Box

I'm currently designing a MS access DB (2003) and have a table/query which has a list of user names and Cubicle numbers. I'd like to copy a picture of the floor plan in a blank form and then place a box over the cubicles and have a lookup expression in there that will search the table/query for the name associated to the cubicle in question.

In MS excel I would use the Vlookup function to search a sheet and find the cubicle name and then show the box 1 to the right which would be the name, how would I do this in access?
CanadaDesksideAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
puppydogbuddyConnect With a Mentor Commented:
Dlookup("[CubicleName]", "YourTable/Query", "CubicleName = '" & Me!!YourTxtbox.Value & "'")
0
 
GRayLConnect With a Mentor Commented:
Put the cubicle number in the tag property of the textbox.  Then make the textbox control source:

=DLookup(["Cubiclename","tblCublicles","CublicNumber"="tbxCubicleNonn.Tag")

Where the nn in tbxCublicleNonn is a number.
0
All Courses

From novice to tech pro — start learning today.