INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

MS Access Combo Box to auto fill text box - problem

MS Access Combo Box to auto fill text box - problem

(OP)
I'm attempting to create a Purchase Order form. The way I have started to setup the form, I have a Combo Box that has a list of our most popular vendors. I would like to have the user be able to select the vendor from the list and based on their selection, have the vendor's address, phone no., contact name, etc. automatically fill in text boxes on the form. The information for the Combo Box is fed from a Table called VendorInfo. Currently there are only 3 vendors in the VendorInfo table. Unfortunately, it's not working 100% correctly. What's happening is this: When a vendor is selected from the Combo Box, the text boxes fill in as they should. If I close out of the form, and reopen it, the information shown in the first 4 columns for the vendor listed for ID 1 of the VendorInfo table gets replaced with the vendor information of the last vendor selected prior to closing the form. Below is the code tied to the Combo Box under the Properties, Event tab, After Update. I'm looking for some guidance on what is wrong and how I can fix it. I'm very new to creating MS Access forms and learned whatever I do know from internet searches. Appreciate anyone's assistance.

Private Sub Combo18_AfterUpdate()
Me.Text10 = Me.Combo18.Column(2)
Me.Text12 = Me.Combo18.Column(3)
Me.Text20 = Me.Combo18.Column(4)
End Sub

This database is really in its infancy. The only table I have right now is the VendorInfo table. There are 10 fields to the table:
VendorName
VendorAddress
VendorCity
VendorState
VendorZip
VendorPhone
VendorFax
VendorCell
VendorEmail
VendorContact

Currently there are only 3 records in the table.

"Making a Purchase" scenario: Our purchasing agent needs to buy 1 or more items. The intent would be that once opened, the form has the next available sequential purchase order number. The purchasing agent selects the vendor from the Combo Box that he will be buying the item(s) from. Rather than having the agent fill in the address, city, state, etc for the vendor, I want that to populate on the form based on the vendor that was selected from the ComboBox. The agent would enter a "Ship To" address and then proceed to type in the items to be purchased with their costs (ultimately would like there to be a list of items that the agent could choose from). The costs would be totaled at the bottom of the form. Form would print to a pdf and emailed to the vendor.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close