Results 1 to 7 of 7
  1. #1
    Accu-Grind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2015
    Posts
    25

    Pulling up information

    So I have a combo box that has a drop down menu for one of the categories in my table. What I want it to now do is fill in the other categories of my table into text boxes when I pick what I want from the combo box. How do I go about doing this? We have it in another database, but the guy who made it doesn't remember how.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    IF you want to fill in many boxes, run an update query to fill in the fields on the current record.
    The combo after update can run a query , quFillCata

    sql for quFillCata
    update from table set [field1] = tbl.field1 where tbl.cata = forms!frmEdit!cboCata

  3. #3
    Accu-Grind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2015
    Posts
    25
    What's the difference between an update query and a regular one?

  4. #4
    Accu-Grind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2015
    Posts
    25
    ok, so I looked it up. The problem is, I'm not trying to update information once I pull it up, I'm just trying to pull it up so I can update data in a different section of the form after the fact. Is this done a different way?

  5. #5
    Accu-Grind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2015
    Posts
    25

    Pulling up information

    Let me redo the question I asked since it seems my question got confused.

    I have a combo box set up that pulls up the information of one part of my table. I would like the rest of my table to go into text boxes that pull up with the rest of the table's information when the field is picked from the combo box. I do not want to edit the information, I just want the text boxes to have the information in them.

    For example: I click on the company name "Accu-Grind." I now want the text boxes to show the "Accu-Grind" address, phone number and contact person.

    How do I do this?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    If all these fields are from the same table, just bind controls to fields.

    This combobox is UNBOUND and used only to input search criteria to find a record?

    Aside from Access intrinsic search/filter tools, review other methods of retrieving existing record:

    http://www.datapigtechnologies.com/f...tomfilter.html

    http://www.allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    keviny04 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Apr 2015
    Posts
    128
    Quote Originally Posted by Accu-Grind View Post
    So I have a combo box that has a drop down menu for one of the categories in my table. What I want it to now do is fill in the other categories of my table into text boxes when I pick what I want from the combo box. How do I go about doing this? We have it in another database, but the guy who made it doesn't remember how.
    Your description isn't clear on what value(s) you want your text boxes to have. Do you want your text boxes to have the value of the combo box itself (i.e. all text boxes getting the same value)? Or do you want them to have values from another table based on the combo box's value as a criterion?

    You will need code to accomplish either. In the combo box's AfterUpdate event:

    ' Assign combo box's value to text boxes
    Me!MyTextBox1 = Me!MyComboBox
    Me!MyTextBox2 = Me!MyComboBox

    etc.

    -OR-

    ' Assign another table's value based on combo box's value as a criterion
    Me!MyTextBox1 = DLookup("[FieldInAnotherTable]", "AnotherTable", "[CritFieldInAnotherTable]='" & Me!MyComboBox & "'")
    etc.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-05-2015, 03:51 PM
  2. Replies: 3
    Last Post: 05-02-2014, 09:27 AM
  3. Replies: 2
    Last Post: 05-26-2012, 10:39 AM
  4. Replies: 3
    Last Post: 05-12-2012, 10:54 AM
  5. Pulling Excel Cell Information via Dynamic URL
    By brenthardy in forum Programming
    Replies: 1
    Last Post: 01-11-2012, 07:16 PM

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