Hi,
I am trying to set the default value on a combobox. And maybe I am saying this wrong for wha tI want to do, if so I am sorry.
I wrote SQL statement that populates the combobox, and that works; but when I ran the application initially the combobox is blank. If I click the arrow I can see and click on an entry and it works, but I want the first value in the list to appear there in the box before the user clicks. So I tried the flowing code but now instead of a blnk or the entery, I get "#Name?"
Which I hovered over the variable Srt and it has the right value in it, am I using the Me.cobMenu.DefaultValue Wrong?
cob is the combobox and I am using MS Access 2010.
Any ideas would be appreaciated.
Thank you
My Code:
I am trying to set the default value on a combobox. And maybe I am saying this wrong for wha tI want to do, if so I am sorry.
I wrote SQL statement that populates the combobox, and that works; but when I ran the application initially the combobox is blank. If I click the arrow I can see and click on an entry and it works, but I want the first value in the list to appear there in the box before the user clicks. So I tried the flowing code but now instead of a blnk or the entery, I get "#Name?"
Which I hovered over the variable Srt and it has the right value in it, am I using the Me.cobMenu.DefaultValue Wrong?
cob is the combobox and I am using MS Access 2010.
Any ideas would be appreaciated.
Thank you
My Code:
Code:
Srt = rs!CombobBox_Name
Me.cobMenu.DefaultValue = Srt[ /CODE]