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

combo box question

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
how would I let a customer update using allow value list edits, a combo box with 2 columns?
I can do it fine with one but with 2 it only updates the first column.

Code:
cboMtrReason
Rowsource:  
SELECT tblMeterTestReasonType.MeterTestREason, tblMeterTestReasonType.ReasonDesc
FROM tblMeterTestReasonType;

Rowsource Type:  Table/Query
Bound to:  column 1
Allow value list edits: yes
Limit to list :  no

Data Sample
[pre]MeterTestREason ReasonDesc[/pre]
[pre]088 PM[/pre]
[pre]11 NR[/pre]
[pre]014 Special test[/pre]
[pre]010 CFD[/pre]
[pre]017 Other[/pre]
[pre]099 New[/pre]

so when they add a new one, I need them to put the number and description

thanks
lhuffst
 
Perhaps set this up as a table rather than a value list, maybe have user enter the number and reason like this: 088;PM
Then use vba and split function to append them to there respective fields. Or you could set up the not in list event to open a popup form and have to separate text boxes for the fields.
 
I would give them a feature to allow them to add to the table. I usually put an icon next to my updateable comboboxes. I almost never allow value list edits and almost always limit to list. If you click the "add/edit" icon it pops open a dialog form where you can add/edit the values. This way you can do lots of data verification and only save the record if both fields are populated.
 
Sxschech - great idea. I'll try that next time but this time, I ended up going with MajP because there were multiple combos that could need new additions.
I ended up making a new form (maint) and have buttons on that page that brings up a form to allow additions to the table. This way, it I can also control who has access if the customer requests it.
Thanks again Everyone!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top