Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Challange

Status
Not open for further replies.

JoeTekTips

Programmer
May 1, 2005
21
US
First, thanks to everyone for thier help in the past. There are some tricky things that I have to deal with for the application that I am creating and I am more of an Access novice than expert.

Anyhow, hear is the latest challange. On a form that creates a new job ticket record, I need to have a combo box's On Change cause certain text boxes to autopopulate. Now the not-so-simple part is that the data for the text boxes will come from a query, and not the same data source as the form.

Basically, when the On Change event happens, a query will run that uses the selection in the combo box as part of the SQL statement.

More specifically, the data source for the form is tblJobTicket. Part of the data fields for tblJobTicket are for address and contact info. Meanwhile, each customer has a record in tblClients. The idea for the form is that when the combo box is selected, a query is run that gets the address feilds from the tblClients and sets the shipping text boxes on the form to those values.

The reason for all of this is so that the user will get the default address info for the client put in the ship to fields. This way, if address happens to be differant than the main address for the customer, it can be changed on the form before the actual job ticket is produced.

Thanks in advance,
-Joe


 
Have a look at the Column property of the ComboBox object.
The basic idea is to already have the infos in hiiden columns in the combo.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That is certainly an easier approach. I don't know if I can assign the values from each particular column to certain text boxes. That would be nice, becuase the ideal thing is to get the values from that query into the text boxes.

I am considering using your idea. If I did, the user would be able to see the stored customers address from the combo box and determine if that is differant than were it is being shipped to. When the Job Ticket is saved, a report pops up that shows a summary of the order. When that happens, I could then test in the query for that report if values were entered and, if not, use the customers address values.

Ideally though, I would like to get the values from the tblCustomers into the address values on the form.

Thanks,
Noah Katz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top