Auto Populate a Combo Box if there is only one option

bdemps03

New member
Local time
Yesterday, 19:51
Joined
Apr 11, 2011
Messages
7
I am making a multiple choice survey and for some questions, there is only one option, such as N/A. If there is one option I would like it to Auto populate in the combo box.

My Row source for a combo box is: SELECT DISTINCT Table1.Year FROM Table1 WHERE (((Table1.Make)=Forms![Form1]!Make))

I am able to view the correct values but I need the value to autopopulate if only one option is available.

I am new to Access so any help would be appreciated.
 
You might try:
If me.cboName.ListCount = 1 then
Me.cboName = Me.cboName.Itemdata(0)
end if

Just change cboName to the actual name of your combo box.
 

Users who are viewing this thread

Back
Top Bottom