Thanks Douglas, this code works fine BUT if the OwnerID is 60 it will
pull records 60, 160,260
or 33 will pull 33, 133, 233 and I dont need to tell you what OwnerID 1
pulls up
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
..Thanks Bob
Me!lstModify.RowSource = "SELECT * FROM qryClientOnly Where [OwnerID]
Like '*" & Me.cmbFindClients & "*';"
If Me!lstModify.ListCount = 0 Then
MsgBox "Sorry, there's nothing for " & Me.cmbFindClients.Column(1)
End If
Me!lstModify.RowSource = "SELECT * FROM qryClientOnly " & _
"Where [OwnerID] Like '*" & Me.cmbFindClients.Column(1) & "*';"
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Thanks Douglas, can I change it to Column(1) as i am getting the
OwnerID Number and not the Name..............Regards Bob
MsgBox "Sorry, there's nothing for " & Me.cmbFindClients
message One approach would be
Private Sub cmbFindClients_AfterUpdate()
Me!lstModify.RowSource = "SELECT * FROM qryClientOnly " & _
"Where [OwnerID] Like '*" & Me.cmbFindClients & "*';"
If Me!lstModify.ListCount = 0 Then
MsgBox "Sorry, there's nothing for " & Me.cmbFindClients
End If
End Sub
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Oops one thing when i select a client and he does not have a record
is it possible to have a warning msg box pop
up?.................Thanks Bob
GOT IT
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
..............Thanks Bob
Private Sub cmbFindClients_AfterUpdate()
Me!lstModify.RowSource = "SELECT * FROM qryClientOnly Where
[OwnerID] Like '*" & Me.cmbFindClients & "*';"
End Sub
Ive created a combo box for my list box both have OwnerID common
Just no quite right yet!
Regards Bob
Private Sub cmbFindClients_AfterUpdate()
Me.Filter = "OwnerID" & cmbFindClients.value
Me.FilterOn = True
End Sub
Thanks Douglas, That what I want to do , is there somewhere you
can point me to create this Scenario.............Thanks Bob
message You mean you want to select something in the combo box and have
that limit what appears in the list box? No problem.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
I have a listbox that is based on a query, One of the fields in
query is [OwnerID]
Can I create a Combo box with [OwnerID] to filter my Listbox?