old value in a combo box

E

Ed

Help!
Me!PreviousProjectSaved = Me!Project.OldValue works fine for a text box, but
I need something like
Me!PreviousProjectSaved = Me!Project.OldValue.Column(2)
 
K

Ken Snell

You'll need to use the DLookup function, as OldValue doesn't contain other
columns' data:

Me!PreviousProjectSaved = DLookup("FieldNameThatIsColumn2", _
"ComboBoxRowSourceQueryOrTable", _
"FieldNameThatIsBoundColumnOfComboBox=" & Me!Project.OldValue)


If FieldNameThatIsBoundColumnOfComboBox is formatted for text, then change
to this:

Me!PreviousProjectSaved = DLookup("FieldNameThatIsColumn2", _
"ComboBoxRowSourceQueryOrTable", _
"FieldNameThatIsBoundColumnOfComboBox='" & Me!Project.OldValue & "")
 
E

Ed

Thanks!
ed

Ken Snell said:
You'll need to use the DLookup function, as OldValue doesn't contain other
columns' data:

Me!PreviousProjectSaved = DLookup("FieldNameThatIsColumn2", _
"ComboBoxRowSourceQueryOrTable", _
"FieldNameThatIsBoundColumnOfComboBox=" & Me!Project.OldValue)


If FieldNameThatIsBoundColumnOfComboBox is formatted for text, then change
to this:

Me!PreviousProjectSaved = DLookup("FieldNameThatIsColumn2", _
"ComboBoxRowSourceQueryOrTable", _
"FieldNameThatIsBoundColumnOfComboBox='" & Me!Project.OldValue & "")
 
¹

¹Ú¹®¼ö

Ed said:
Help!
Me!PreviousProjectSaved = Me!Project.OldValue works fine for a text box, but
I need something like
Me!PreviousProjectSaved = Me!Project.OldValue.Column(2)
 
¹

¹Ú¹®¼ö

Ed said:
Help!
Me!PreviousProjectSaved = Me!Project.OldValue works fine for a text box, but
I need something like
Me!PreviousProjectSaved = Me!Project.OldValue.Column(2)
 
Top