Mario R. Perez
New member
- Local time
- Today, 09:29
- Joined
- May 14, 2020
- Messages
- 16
Good Morning Everyone.
I have this class.
Private WithEvents m_cbo As Access.ComboBox
Private Const OrigenClient As String = "SELECT TblCustomer.id, TblCustomer.FldfullName,tblcustomer.[FldPhone] From TblCustomer where TblCustomer.FldfullName "
'Private Const Fono As String = "FldPhone"
Public Sub load(cbO As Access.ComboBox)
Set m_cbo = cbO
m_cbo.RowSource = OrigenClient
m_cbnGotFocus = "[Event Procedure]"
m_cbnKeyUp = "[Event Procedure]"
End Sub
Private Sub m_cbo__GotFocus()
m_cbo.Dropdown
End Sub
Private Sub m_cbo_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Exit Sub
End If
If KeyCode = vbKeyDown Or KeyCode = vbKeyUp Then
Else
m_cbo.RowSource = OrigenClient & " LIKE '*" & m_cbo.text & "*'" & "OR" & "(" & m_cbo.Column(2) & " Like '" & "*" & m_cbo.text & "*" & "'));"
m_cbo.Dropdown
End If
End Sub
Before of "
& "OR" & "(" & m_cbo.Column(2) & " Like '" & "*" & m_cbo.text & "*" & "'));"" works perfect but when i want to use it with the "OR.." it fails. you know where the problem is.
Thanks for advance.
I have this class.
Private WithEvents m_cbo As Access.ComboBox
Private Const OrigenClient As String = "SELECT TblCustomer.id, TblCustomer.FldfullName,tblcustomer.[FldPhone] From TblCustomer where TblCustomer.FldfullName "
'Private Const Fono As String = "FldPhone"
Public Sub load(cbO As Access.ComboBox)
Set m_cbo = cbO
m_cbo.RowSource = OrigenClient
m_cbnGotFocus = "[Event Procedure]"
m_cbnKeyUp = "[Event Procedure]"
End Sub
Private Sub m_cbo__GotFocus()
m_cbo.Dropdown
End Sub
Private Sub m_cbo_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Exit Sub
End If
If KeyCode = vbKeyDown Or KeyCode = vbKeyUp Then
Else
m_cbo.RowSource = OrigenClient & " LIKE '*" & m_cbo.text & "*'" & "OR" & "(" & m_cbo.Column(2) & " Like '" & "*" & m_cbo.text & "*" & "'));"
m_cbo.Dropdown
End If
End Sub
Before of "
& "OR" & "(" & m_cbo.Column(2) & " Like '" & "*" & m_cbo.text & "*" & "'));"" works perfect but when i want to use it with the "OR.." it fails. you know where the problem is.
Thanks for advance.