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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Combo Box posting data to two fields 1

Status
Not open for further replies.

rokkit99

Technical User
May 30, 2002
20
0
0
US
Hi All,

I have one little problem with an access form. It's the Haul Table Entry form. The 2nd entry down is a combo box. It show the Client Number and Client Name in the box, and then posts the Client Name in the Client Name field in the form. The Combo Box is Called Combo 23.

I also need the Client Number to Post in the Client Number Field. It is not currently on the form, but is one of the fields in the table. When the other forms & reports try to get the client number from this haul table, they are getting a blank return because this client number ends up being posted in a field called Combo Box 23.

Any way to post that Combo box entry to the Client Number field? Any help or fix would be greatly appreciated as they as trying to use the program and this is the final bug.

Thanks - Jim
 
HI

Question, why are you saving both the name and the Id in the 'Haul' table, why not just save the Id, and get the name by having a query which joins the two tables (Customer and Haul)?

But if you must do this, I assume Id is Column 1 of combo, and this is the bound column?, if it is not already put Name (from Haul table) on the form, make it visible = false if you do not wish to see it, in the after update event of the combo (23) put txtName = Combo23.column(1). Where txtNAme is the name of the control containing the name.

Please also give controls meaningful names eg cboCustomer not Combo23, you will save yourself a lot of trouble in the future when you come to maintain your application.

Regards


Ken Reay
Freelance Developer
kenneth.reay@talk21.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top