Results 1 to 2 of 2
  1. #1
    mcongdon is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2010
    Posts
    1

    Question Lookup Value on Form Based on Text Box on Same Form

    Hello All,
    I have a question that I just cannot figure out. I have a very simple database that exists for one purpose. It has 1 table with three fields in it:

    CUSIP
    Date
    Price

    On the only form in the database, I would like there to be three fields:

    CUSIP
    Date
    Price

    CUSIP and Date will be entered by the user and I would like the price to be looked up based on both of these values. The combination of CUSIP and Date is unique in the database.

    For example, I would like the user to be able to type in a CUSIP, tab to the date field, enter the date, and press enter to have the price field update with the queried value from the table.



    Is there any way to do this? Any help will be greatly appreciated.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    well in a way; it is made hard because you are segmenting it so much. In a normal drop down (combobox) one can have multiple columns and so it is very common for someone to lookup multiple columns simultaneously (in your case both the cusip & date) at the same moment in time.....sort of like selecting Last Name, First Name in a big list of names....the human can deal with it easily to find the right combo by scanning down the list......

    but one can definitely do what you need; have an unbound text box for each cusip and date..... make a query of the table and have that query pull its criteria from these text boxes...

    then you need to figure out how you want to display it, and requery...you could insert it as a subform or make the main form based on it and trigger the requery....there are a couple different ways to implement it - not sure how elegant the display must be - probably a subform that requeries when new data is entered is easiest.....

    hope this helps.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. FORM FIELD based on another form EASY ???
    By jaketsuar in forum Forms
    Replies: 4
    Last Post: 05-29-2010, 06:25 PM
  2. Lookup Form (should be simple)
    By joshlee in forum Forms
    Replies: 3
    Last Post: 05-06-2009, 12:04 PM
  3. Lookup Form
    By virgiljones in forum Access
    Replies: 0
    Last Post: 10-17-2008, 10:39 PM
  4. Write text to text box on a form
    By DKY in forum Programming
    Replies: 0
    Last Post: 10-08-2008, 11:34 AM
  5. Lookup Form
    By cav0227 in forum Forms
    Replies: 0
    Last Post: 04-16-2007, 09:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums