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: Oldest
  1. Anonymous
    2011-03-28T21:37:23+00:00

    You lost me.  You seem to be implying that there is more than one part number text box.

    If you use a combo box instead of a text box to display the part number for the selected customer selected in combo69, then you open the door for selecting a part number for a different customer.  I think you should forget this thought and concentrate on getting the arrangement to work.  The key things to check is everything about the combo box, the control source of the text box and the names of the controls and fields.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-03-29T19:26:02+00:00

    Let me try something else.  If I use a combo box drawing from my Customer / Final Part Number / Assembly Part Number database, I can get a drop-down menu with three columns, with all of the relevant data lined up.  Is there a way to record all three of these columns?  Because as far as I can tell, I can only choose to record one column.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-03-29T19:38:00+00:00

    That's exactly what I have been describing all along.  I guess the thing you missed was that combo69 RowSource query needs all three columns.

    To copy the two part numbers you will need two lines of code:

      Me.FPNtextbox = Me.Combo69.Column(1)

      Me.APNtextbox = Me.Combo69.Column(2)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-03-29T19:46:47+00:00

    No, I know.  I had the combo box previously, and I had the dimensions set to 1";0";0".  I'm going to give it another go, though.  Do I need to text boxes to record the P/Ns?  Or can I just do it without showing it on the Form?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-03-29T19:50:03+00:00

    I don't know what to tell you, but I'm putting in that code in the AfterUpdate, changing it for the actual names of the boxes, of course, and it's still not doing *anything* at all.

    Was this answer helpful?

    0 comments No comments