I have a form where I select from a drop down the course description, after which I want to have the course number auto-populate.
I have attached a sanitized copy of the DB so you may see what I am trying to accomplish.
Quarters History Test2.zip
I have a form where I select from a drop down the course description, after which I want to have the course number auto-populate.
I have attached a sanitized copy of the DB so you may see what I am trying to accomplish.
Quarters History Test2.zip
Really should be saving only the course number. Use a multi-column combobox and the course number will automatically save http://www.datapigtechnologies.com/f...combobox3.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
The users don't know the course number only the description.
That's the beauty of multi-column combobox. Users see the description but the number is saved. Did you view the video?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes I did. Loved what I saw. WIll be coding it today. Let you know how it goes. Thanks.
Works like a champ. But how do I get it to save both values?
Refer to the Column Number of your combo. It starts at 0.
Me.cboSomeCombo.Column(1)
HTH
Basically, shouldn't save both, only one or the other.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yeah I see that. Found a way to get what I need by doing an update after saving the value. Thanks again.
An UPDATE sql action is not needed.
As burrina shows, code can reference the combobox columns by their index. So if you really must save the description (not recommended), code in combobox AfterUpdate event:
Me!description = Me.comboboxname.Column(1)
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.