Results 1 to 3 of 3
  1. #1
    Nuke1096 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2013
    Posts
    53

    Command Button that looks up field and displays in text box

    What I'm looking to do sounds very simple, but I'm having some trouble figuring things out. I'm still very novice with access and programming

    I want to create a series of command button so that when clicked on, it looks at a table, associates the Primary ID in the table with teh specific command button its for, then displays a specific field in a text box.

    So to try to visualize it.

    I have 4 Command Buttons on my form, each labeled...

    Department 1
    Department 2
    Department 3
    Department 4

    Then a Department Table created with three fields, with a total of 4 rows, one for each Department. The fields are...



    Department ID
    Department Name
    Department Phone Number

    So I want to be able to click on say the Department 2 Button, which will then look into that table, recognize that the 2nd Department ID is tied to Department 2 Button, then pull the Department Phone Number for that row, and display it in a text box.

    Anyway help is greatly appreciated

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    A combo box may be as good or better for this.

    Dale

  3. #3
    Nuke1096 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2013
    Posts
    53
    The way the form is setup, a combo box wouldn't really work for how I want everything displayed

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

Similar Threads

  1. Replies: 1
    Last Post: 03-19-2012, 11:03 AM
  2. Replies: 5
    Last Post: 02-21-2012, 07:33 AM
  3. Populate text boxes with a command button
    By Brian62 in forum Forms
    Replies: 3
    Last Post: 09-30-2011, 12:52 PM
  4. Replies: 1
    Last Post: 09-20-2011, 05:57 AM
  5. Replies: 11
    Last Post: 06-02-2011, 10:21 AM

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