T
Tal
I have the following code in the OnCurrent event of my form.
It is returning nothing, though I do not get any error messages either, just
a very empty combo box.
Help much appreciated.
Cheers,
Tal
Private Sub Form_Current()
Dim strRowSource As String
If IsNull(Me.txtClientLastName) = False Then
strRowSource = strRowSource & Me.txtClientFirstName & " " &
Me.txtClientLastName & ";"
If IsNull(Me.txtClientCompanyOnly) = False Then
strRowSource = strRowSource & Me.txtClientCompanyOnly & ";"
If IsNull(Me.txtClientSpouseFirstName) = False Then
strRowSource = strRowSource & Me.txtClientSpouseFirstName & " " &
Me.txtClientLastName & ";"
strRowSource = strRowSource & Me.txtClientFirstName & " or " &
Me.txtClientSpouseFirstName & " " & Me.txtClientLastName & ";"
If IsNull(Me.txtClientSpouseLastName) = False Then
strRowSource = strRowSource & Me.txtClientSpouseFirstName & " " &
Me.txtClientSpouseLastName & ";"
End If
If Len(strRowSource) > 0 Then
strRowSource = Left$(strRowSource, Len(strRowSource) - 1)
Me.keyReceiptTo.RowSourceType = "Value List"
Me.keyReceiptTo.RowSource = strRowSource
Else
Me.keyReceiptTo.RowSourceType = ""
Me.keyReceiptTo.RowSource = ""
End If
End Sub
It is returning nothing, though I do not get any error messages either, just
a very empty combo box.
Help much appreciated.
Cheers,
Tal
Private Sub Form_Current()
Dim strRowSource As String
If IsNull(Me.txtClientLastName) = False Then
strRowSource = strRowSource & Me.txtClientFirstName & " " &
Me.txtClientLastName & ";"
If IsNull(Me.txtClientCompanyOnly) = False Then
strRowSource = strRowSource & Me.txtClientCompanyOnly & ";"
If IsNull(Me.txtClientSpouseFirstName) = False Then
strRowSource = strRowSource & Me.txtClientSpouseFirstName & " " &
Me.txtClientLastName & ";"
strRowSource = strRowSource & Me.txtClientFirstName & " or " &
Me.txtClientSpouseFirstName & " " & Me.txtClientLastName & ";"
If IsNull(Me.txtClientSpouseLastName) = False Then
strRowSource = strRowSource & Me.txtClientSpouseFirstName & " " &
Me.txtClientSpouseLastName & ";"
End If
If Len(strRowSource) > 0 Then
strRowSource = Left$(strRowSource, Len(strRowSource) - 1)
Me.keyReceiptTo.RowSourceType = "Value List"
Me.keyReceiptTo.RowSource = strRowSource
Else
Me.keyReceiptTo.RowSourceType = ""
Me.keyReceiptTo.RowSource = ""
End If
End Sub