Getting value entered in Combo Box

D

dhstein

I'm trying to read the value selected from a combo box. This isn't working.
Any help is appreciated. Thanks.


Private Sub cbxRecords_AfterUpdate()
MsgBox "Hello"
abc = cbxRecords.Selected
MsgBox abc
End Sub
 
R

Rick Brandt

I'm trying to read the value selected from a combo box. This isn't
working. Any help is appreciated. Thanks.


Private Sub cbxRecords_AfterUpdate()
MsgBox "Hello"
abc = cbxRecords.Selected
MsgBox abc
End Sub

Get rid of .selected. A ComboBox has a Value property just like any
other control and since that is the default property you don't have to
explicitly reference it.
 
D

dhstein

Rick Brandt said:
Get rid of .selected. A ComboBox has a Value property just like any
other control and since that is the default property you don't have to
explicitly reference it.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Thanks Rick - that worked.
 
T

tim williams

dhstein said:
I'm trying to read the value selected from a combo box. This isn't
working.
Any help is appreciated. Thanks.


Private Sub cbxRecords_AfterUpdate()
MsgBox "Hello"
abc = cbxRecords.Selected
MsgBox abc
End Sub
 
Top