Results 1 to 13 of 13
  1. #1
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7

    Population text field from related data entered in another text field.


    Hello all. I have literally been searching this forum and the internet all day to try and resolve my problem and have not found an answer that worked. So, I am sorry if this is a repeated question but I am looking for an answer that will work for my exact issue. To start off, I have never used access before today and I am trying to solve a problem that I believe to be somewhat complex. And here it is. For the company I work for, we sell products and use access for our database mainly for our warranty calls. So when a warranty call is taken, we open up a "form" within access, and use that form with drop down menus and other text fields etc. etc. for that certain call and customer. Obviously, they are all filled in as best as possible from the information that the customer gives us, and it is then stored. For our products, there is a name and a part number for everything that we sell. These both are part of the form that is used on a warranty call. I am wanting to make the form in access so we can write in the PRODUCT NUMBER in its designated text box, and when that is entered, I want the text box for the PART NAME to be populated automatically, depending on the part number entered. The reason for this is less time to enter, less questions we need to ask, and consistency with the data we need for different failure analysis for parts. (Many times the part name is misspelled and when doing a search, it will not be found). So, I know this is possible, but I do not have a clue where to start. If a formula is needed, please use "part name" and "part number" for the variables. Thank you so much in advance and I do apologize if this is a repeated question. Any help will be awesome.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, a common topic.

    Options:

    1. Form RecordSource is a query that joins tables so the related info from products table is available. Bind textboxes to fields of products table and set properties Locked Yes and TabStop No.

    2. The product number control is a multi-column combobox with product number and product description. Textbox ControlSource expression refers to the column with the description.

    Is it PRODUCT NUMBER or PART NUMBER that is entered?
    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.

  3. #3
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    Quote Originally Posted by June7 View Post

    Is it PRODUCT NUMBER or PART NUMBER that is entered?
    It is the part number that is entered. Thanks for the reply.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Okay, then change 'product' to 'part' in my suggestion. Have any luck with it?
    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.

  5. #5
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    Quote Originally Posted by June7 View Post

    1. Form RecordSource is a query that joins tables so the related info from products table is available. Bind textboxes to fields of products table and set properties Locked Yes and TabStop No.
    I am not quite sure where to start when you say bind text boxes. What settings would I go to to perform this step? Thanks. Also where is the Tab Stop option?

  6. #6
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    Ok I have figured out how to do all the steps you have told me this far, but I know need to know how to make the relationship between the two textboxes. Right now I have it so they are related to the specific coloumns that have the correct information in them, but it will not let me enter the part number. It says "#NAME?" in the box instead.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Are you using option 1?

    The box (combobox?) for PartNumber is a data entry control and should be bound to the PartNumber field of the parent table, not Parts table. Bind textboxes to the other related fields of Parts table.

    That error means Access doesn't recognize a name reference, possibly a misspelling. If you are using option 1 I expect there are two PartNumber fields in the RecordSource. Look at the field list in the ControlSource dropdown and pick the one from primary table.
    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.

  8. #8
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    How exactly do I bind the PartNumber text box to the PartNumber field in the table they are in?

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The table is part of form RecordSource? Set ControlSource property of textbox.
    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.

  10. #10
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    In the ControlSource I set the path with the (...) button to the field where the part numbers are in the part table and I did the same for the part name text field. Still nothing. The "#Name?" error keeps coming up in the text field.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    From my earlier post "The box (combobox?) for PartNumber is a data entry control and should be bound to the PartNumber field of the parent table, not Parts table. Bind textboxes to the other related fields of Parts table."

    Why use expression builder to bind ControlSource? Also from earlier post "Look at the field list in the ControlSource dropdown and pick the one from primary table."
    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.

  12. #12
    Accessnoob11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    7
    Ok I have everything linked up now. The Part # field in the table is linked to the Part # text box and I have updated both the RecordSource and the ControlSource. The only trouble is that when I now enter the part #, it updates the table, not the text box in the form. How do I get the text box to populate in the form? thanks

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The control must be bound to the field in the primary table, not the the Part # field from Parts table. Want to provide your project for analysis? Follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. text box to see changed data for a given field
    By fabiobarreto10 in forum Forms
    Replies: 12
    Last Post: 01-12-2012, 04:26 PM
  2. Replies: 3
    Last Post: 12-11-2011, 02:18 PM
  3. Replies: 3
    Last Post: 10-13-2011, 04:42 PM
  4. Replies: 2
    Last Post: 05-05-2010, 02:52 PM
  5. Replies: 1
    Last Post: 03-02-2006, 06:17 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