Aug 29, 2001
So basically i have two txt boxes where you type in a first name and surname (you can enter one letter so it narrows it to all names beginning with B or M).
So i have two text boxes then i click search which is a button designed and coded (not wizard).
All the names are stored in a list box. In theory what should happen is that when clicking search (once you have entered a letter or name in the text boxes)the range of names (if typed one letter) or a single name ONLY appears in the LIST box where all the names are held and when clicking on the result/returned name in the list box you can edit that record or delete it.
example
(Enter) first name : ____John_______ (txt box)
(Enter) surname: ________Smith________ (txt box)
(Click) Search (button)
_____________________________________ (list box)
List Box (before clicking) : Name
Name
Name
-------------------------------------
List Box (After clicking search) : (button)
____________________________________
(List box)
John Smith
------------------------------------
when clicking clear all the names come back into the list box.
If you need a screen print let me know i will send an e-mail (if you leave your address)
Thank you for your help.
CODING FOR SERACH BUTTON
Private Sub Cmdsearch_Click()
If IsNull(TxtCpCode) And IsNull(txtCompnm) Then
MsgBox ("Please enter Company Code or Comapny Name"
Else
Call Update
End If
End Sub
CODING FOR CALL UPDATE
Private Sub Update()
LstComp.SetFocus
LstComp.Requery
End Sub
So basically i have two txt boxes where you type in a first name and surname (you can enter one letter so it narrows it to all names beginning with B or M).
So i have two text boxes then i click search which is a button designed and coded (not wizard).
All the names are stored in a list box. In theory what should happen is that when clicking search (once you have entered a letter or name in the text boxes)the range of names (if typed one letter) or a single name ONLY appears in the LIST box where all the names are held and when clicking on the result/returned name in the list box you can edit that record or delete it.
example
(Enter) first name : ____John_______ (txt box)
(Enter) surname: ________Smith________ (txt box)
(Click) Search (button)
_____________________________________ (list box)
List Box (before clicking) : Name
Name
Name
-------------------------------------
List Box (After clicking search) : (button)
____________________________________
(List box)
John Smith
------------------------------------
when clicking clear all the names come back into the list box.
If you need a screen print let me know i will send an e-mail (if you leave your address)
Thank you for your help.
CODING FOR SERACH BUTTON
Private Sub Cmdsearch_Click()
If IsNull(TxtCpCode) And IsNull(txtCompnm) Then
MsgBox ("Please enter Company Code or Comapny Name"
Else
Call Update
End If
End Sub
CODING FOR CALL UPDATE
Private Sub Update()
LstComp.SetFocus
LstComp.Requery
End Sub