I have a combobox with a OnChange event and im calling the following code:
Private Sub cbCompanyName_Change()
Dim cbo As ComboBox
Dim sText As String
cbo = Me.Controls("cbCompanyName")
'Set cbo = Me.cbCompanyName
sText = cbo.Value
'sText = cbo.Text
'sText = cbo.Column(1)
Select Case sText
Case " "
cbo = Null
Exit Sub
Case Else
Call ReLoadCustomers(sText, cbo)
End Select
Set cbo = Nothing
If Not Me.ChkCustomer Then
Me.ChkCustomer = True
Me.Form.Repaint
End If
End Sub
In either call to set the cbo variable it is still null.
Thank you for your time.
Private Sub cbCompanyName_Change()
Dim cbo As ComboBox
Dim sText As String
cbo = Me.Controls("cbCompanyName")
'Set cbo = Me.cbCompanyName
sText = cbo.Value
'sText = cbo.Text
'sText = cbo.Column(1)
Select Case sText
Case " "
cbo = Null
Exit Sub
Case Else
Call ReLoadCustomers(sText, cbo)
End Select
Set cbo = Nothing
If Not Me.ChkCustomer Then
Me.ChkCustomer = True
Me.Form.Repaint
End If
End Sub
In either call to set the cbo variable it is still null.
Thank you for your time.