L
Lee Taylor-Vaughan
Someone, please help me--even if you give me just a hint!
Hello
Issue 1: I have a list box on a form, which is populated based upon the
entries made in various text boxes, and upon the Search button being
clicked. (cmdSearch).
below is the code, so far.
Public Sub cmdSearch_Click()
If Not IsNull(Me.scboState) Then
Me.List74.RowSource = "SELECT tblMain.FirstName, tblMain.MiddleName,
tblMain.LastName, tblMain.Address1, tblMain.City, tblMain.State,
tblMain.PhoneNumberHome, FROM tblMain WHERE (((tblMain.LastName) >=
[Forms]![frmUserSearch]![stxtLastName])) ORDER BY
tblMain.LastName;"
Me.Refresh
Me.Repaint
Else
MsgBox "Select a State from the list", vbCritical, "Missing State"
End If
End Sub
It doesn't work, meaning, nothing gets populuated to the list box, why, what
did i do wrong?
Issue 2: Also, what i would really like to do is enter say one or two
characters from a person first name and last name, select the state they
live in (from a combo box) and then have the list box populated from there,
but i cant even get it to work from just entering the last name (issue 1
above!). How do i get it to work by entering more than one piece of
information in muliptle boxes (FName, LName, MiddleName, SSN, etc...) --the
user has the option to leave a field blank too (this is the really tricky
part). if someone can give me an snipit of code to get me going, and a nudge
in the right direction, i think i will be fine. (i hope)
Thanks
Lee
Hello
Issue 1: I have a list box on a form, which is populated based upon the
entries made in various text boxes, and upon the Search button being
clicked. (cmdSearch).
below is the code, so far.
Public Sub cmdSearch_Click()
If Not IsNull(Me.scboState) Then
Me.List74.RowSource = "SELECT tblMain.FirstName, tblMain.MiddleName,
tblMain.LastName, tblMain.Address1, tblMain.City, tblMain.State,
tblMain.PhoneNumberHome, FROM tblMain WHERE (((tblMain.LastName) >=
[Forms]![frmUserSearch]![stxtLastName])) ORDER BY
tblMain.LastName;"
Me.Refresh
Me.Repaint
Else
MsgBox "Select a State from the list", vbCritical, "Missing State"
End If
End Sub
It doesn't work, meaning, nothing gets populuated to the list box, why, what
did i do wrong?
Issue 2: Also, what i would really like to do is enter say one or two
characters from a person first name and last name, select the state they
live in (from a combo box) and then have the list box populated from there,
but i cant even get it to work from just entering the last name (issue 1
above!). How do i get it to work by entering more than one piece of
information in muliptle boxes (FName, LName, MiddleName, SSN, etc...) --the
user has the option to leave a field blank too (this is the really tricky
part). if someone can give me an snipit of code to get me going, and a nudge
in the right direction, i think i will be fine. (i hope)
Thanks
Lee