MS Access: Search data from a Text Box

Posted on 2007-07-27
Last Modified: 2008-02-01
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?
Question by:CanadaDeskside
    LVL 38

    Accepted Solution

    Dlookup("[CubicleName]", "YourTable/Query", "CubicleName = '" & Me!!YourTxtbox.Value & "'")
    LVL 44

    Assisted Solution

    Put the cubicle number in the tag property of the textbox.  Then make the textbox control source:


    Where the nn in tbxCublicleNonn is a number.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now