Autopopulate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Freeman
    New Member
    • Nov 2011
    • 2

    #1

    Autopopulate

    I have built a database to manage the borrowing of items from stores. On the “New Request” form I have the facility to register the borrowing of up to 3 items. To make the request simple and minimise the risk of errors I have three combo boxes for Part Codes and I want to auto populate the relevant Part Description boxes. By using the code below I can achieve my aim for the first item [Part Code]but how do I do the same for the other two?[Part_Code2] & [Part_Code3].
    Private Sub Part_Code_After Update()
    Me.Part_Descrip tion = Me.Part_Code.Co lumn(1)
    End Sub
    I have a two column source table (PartNumber) containing Part Code and Part Description and for traceability I need to record who borrows what and when so have a second table (Removal) populated from the form via a query. I know I’m breaking the first rule of databases by storing the data twice but company rules mean we must keep history. Currently, the “librarians” are populating Part Description boxes 2 & 3 manually.
    Thanks in advance for any help you can give.
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    Seems you're leaving out something. Why is there any question about how to do it?

    You do have 2 more combo boxes, correct? Each of them can have an AfterUpdate event. Each one will look similar to the one you have described, but of course me.Part_Descrip tion will become Me.Part2_Descri ption=Me.Part_C ode2.Column(1) for the 2nd one and Me.Part3_Descri ption=Me.Part_C ode3.Column(1) for the 3rd one, or whatever the exact names are.

    Jim

    Comment

    • Tony Freeman
      New Member
      • Nov 2011
      • 2

      #3
      Thanks Jim, your reply made me look closer at my combo box names, simple typo error on my part.

      Comment

      Working...