By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,290 Members | 1,739 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,290 IT Pros & Developers. It's quick & easy.

Autopopulate

P: 2
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_AfterUpdate()
Me.Part_Description = Me.Part_Code.Column(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.
Nov 7 '11 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,221
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_Description will become Me.Part2_Description=Me.Part_Code2.Column(1) for the 2nd one and Me.Part3_Description=Me.Part_Code3.Column(1) for the 3rd one, or whatever the exact names are.

Jim
Nov 7 '11 #2

P: 2
Thanks Jim, your reply made me look closer at my combo box names, simple typo error on my part.
Nov 8 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.