How to reference the Combo box text, not its record id ?

Jack Spratt

Registered User.
Local time
Today, 22:17
Joined
Nov 4, 2007
Messages
20
My first post, and hopefully a useful one !

I have a combo-box (Combo50) in my form that has its own RowSource query. [Combo50].Value correctly gives me '2' which is the record id of my selection, but I want to pick up the text of the field that's shown which is 'Prospect'. Can I simply access that as a control property, or do I have to requery ?

Thanks
 
As long as the text is included in the query, just reference the column number (zero based):


Me.YourTextBoxNameHere = Me.YourComboBoxName.Column(1)
 
Last edited:
Many thanks Bob - this is now working fine and I can move on !

Private Sub Form_BeforeUpdate(Cancel As Integer)
MsgBox "Before Update the selection is: " & Me.Combo69.Column(1)
End Sub
 
Oh, and by the way - Welcome to Access World Forums :)
 

Users who are viewing this thread

Back
Top Bottom