If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Default display in combox
How do I get a default value displayed in an unbound combo-box?
When I open the form, I'd like to be able to set an item from my RecordSource to be displayed. When I click a cmdOK on that form, I'd like that "default" to be the value of the combobox if the user didn't select something different. Thanks. Gary |
#2
|
|||
|
|||
Default display in combox
Hi Gary!
I guess you'll have to use VBA for your form's onLoad event. You must insert these lines of code between "Sub... and ....End Sub" procedure called when the form is being loaded. Me.Combo1.Value = Dlookup("[Name of a column]","[Name of the table]", "set of certain conditions to retrieve the default value") "Gary Schuldt" wrote in message ... How do I get a default value displayed in an unbound combo-box? When I open the form, I'd like to be able to set an item from my RecordSource to be displayed. When I click a cmdOK on that form, I'd like that "default" to be the value of the combobox if the user didn't select something different. Thanks. Gary |
#3
|
|||
|
|||
Default display in combox
Thanks, Michael!
My first application of the statement worked fine. Gary "Michael" wrote in message ... Hi Gary! I guess you'll have to use VBA for your form's onLoad event. You must insert these lines of code between "Sub... and ....End Sub" procedure called when the form is being loaded. Me.Combo1.Value = Dlookup("[Name of a column]","[Name of the table]", "set of certain conditions to retrieve the default value") "Gary Schuldt" wrote in message ... How do I get a default value displayed in an unbound combo-box? When I open the form, I'd like to be able to set an item from my RecordSource to be displayed. When I click a cmdOK on that form, I'd like that "default" to be the value of the combobox if the user didn't select something different. Thanks. Gary |
Thread Tools | |
Display Modes | |
|
|