Make text box automatic, based on drop-down menu

Anonymous
2011-03-21T18:06:56+00:00

I am using Microsft Access 2007.  I have a form that has a drop-down menu to select a customer from a separate table.  I have a text box next to it for the part number, and another text box next to that for the program number.  The P/Ns are specific to each customer.  So, I would like to make it such that, in this form, when a customer is selected from the menu, the P/Ns automatically generate.  How can this be done?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

45 answers

Sort by: Most helpful
  1. ScottGem 68,840 Reputation points Volunteer Moderator
    2011-03-24T19:51:59+00:00

    I would appreciate a few tips on how to get a text box to auto-fill with these values, AND send them to the table/query that they correspond to.

    My blog on Displaying Data from Related tables should help you there.

    But you are still missing a point here. You do not need to "send" these values anywhere. They already exist in one place, you just need to make sure you include a Foreign Key to link the record back to where they exist. You then add the table where they exist to your query joining them on the keyfields.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-03-24T19:20:34+00:00

    Alright, thanks!  I'm studying up on them now, to make sure that I'm not making any sort of redundancy issues for myself. 

    I would appreciate a few tips on how to get a text box to auto-fill with these values, AND send them to the table/query that they correspond to.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-03-24T18:52:11+00:00

    The Wikipedia article on normalization is reasonably good:

    http://en.wikipedia.org/wiki/Database_normalization

    Follow the links to the various normal forms.  There's quite a lot of formal language in there, which may seem a little daunting at first sight, but try and get your teeth around it as once you have an understanding of these formal principles you can apply them to any table to determine whether it is correctly normalized or requires further decomposition into two or more normalized tables.  The examples will help you understand the principles as these use real world entities and attributes, if a little unrealistically.

    You may be wondering why it is usually advised that people gain a good understanding of the first three normal forms rather than going beyond the third.  This is partly because these are relatively easy to grasp, whereas with the higher normal forms the concepts become a little trickier.  However, it also reflects the fact that in most day to day situations normalization to 3NF means that a table is normalized to the higher normal forms (to 5NF at any rate).  Unfortunately this is sometimes misunderstood as meaning that normalization beyond 3NF is not important.  This is certainly not the case, however, and where a business model demands normalization beyond 3NF, not to do so could lead to serious anomalies.  Some time ago I recounted such a situation here, drawing on my own experience in a Purchase and Supply department of a large manufacturing company, where not to normalize to 5NF would have allowed products which were sub-standard for certain uses to be unwittingly purchased.  In this particular case the implications were not critical, but if we'd been a car manufacturer and the products were components in the steering system of a vehicle, that would have been a different kettle of fish.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-03-24T18:11:36+00:00

    What is the best way to study and understand the Normalization first three forms? 

    And I put that code in the AfterUpdate...now it says [Event Procedure], right?  It didn't work, so I also put the [Event Procedure] in the Assembly P/N and Final P/N BeforeUpdate...still didn't work.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-03-24T16:08:43+00:00

    Did you put that line of code in the combo box's AfterUpdate event procedure?  Did you also change the text box's control source from the expression to the name of the PN field in the form's table?

    Regardless of whether that works or not, you really need to study up on Normalization's first three normal forms.  Ken and others have spent a lot of time trying to explain why this is important.  Taking what may appear to be a shortcut through the database structure rules just to satisfy a short term expediency will make life more and more difficult as you try to do more with your application.

    Was this answer helpful?

    0 comments No comments