I have a combo box bound to an ID# and then there is a 2nd column with a description. I have a dlookup that I would like to have the description sent back to me instead of the ID# in my text box. The statement is below:
If Me.cboCategory.Value = 2 Then
Me.txtDatePerClientInfo = DLookup("ClientYrEndMo", "tblClientInfo", _
"[ClientNum]='" & Me.cboAcctNumber & "'")
'Make txtDatePerClientInfo and lblFromClientInfo visible again
Me.txtDatePerClientInfo.Visible = True
Me.lblFromClientInfo.Visible = True
End If
The IF statement is working but the value returned in txtDatePerClientInfo is the ID#, not the description as I would like. I have seen .column(1) in a few other posts but haven't been able to determine where to place it or how the logic works yet. The combo box the ID# is in is "ClientYrEndMo". I tried the .column(1) after "ClientYrEndMo" but it didn't work.
Any ideas would be appreciated.
If Me.cboCategory.Value = 2 Then
Me.txtDatePerClientInfo = DLookup("ClientYrEndMo", "tblClientInfo", _
"[ClientNum]='" & Me.cboAcctNumber & "'")
'Make txtDatePerClientInfo and lblFromClientInfo visible again
Me.txtDatePerClientInfo.Visible = True
Me.lblFromClientInfo.Visible = True
End If
The IF statement is working but the value returned in txtDatePerClientInfo is the ID#, not the description as I would like. I have seen .column(1) in a few other posts but haven't been able to determine where to place it or how the logic works yet. The combo box the ID# is in is "ClientYrEndMo". I tried the .column(1) after "ClientYrEndMo" but it didn't work.
Any ideas would be appreciated.