- This topic has 2 replies, 3 voices, and was last updated 22 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Archives › Computer Support › Computer Support Discussion › vb help with find code
I am using VB6 and I am tryin to do a find where the user selects a market form acombo box and then clicks ona find button and inputs a bts they are trying to find. I want the db to search for the BTS only where the market they have chosen in the combo box is true any ideas? here is the code I have so far, it works as I have it with the ‘before & switch. text4.text is the where the combo box value is stored.
Private Sub Command1_Click()
bos = Text4.Text
prompt$ = ” enter the BTS”
searchstr$ = InputBox(prompt$, “bts”)
test = searchstr$
Data1.Recordset.FindFirst “bts= ‘” & test & “‘” ‘& “switch='” & bos & “‘”
If Data1.Recordset.NoMatch Then Data1.Recordset.FindFirst “bts like’*” & test & “*'”
End Sub
thanks in advance for your help
clean up your english then we may understand your problem.
I am using VB6 and I am tryin to do a find where the user selects a market form acombo box and then clicks ona find button and inputs a bts they are trying to find. I want the db to search for the BTS only where the market they have chosen in the combo box is true any ideas? here is the code I have so far, it works as I have it with the ‘before & switch. text4.text is the where the combo box value is stored.
Private Sub Command1_Click()
bos = Text4.Text
prompt$ = ” enter the BTS”
searchstr$ = InputBox(prompt$, “bts”)
test = searchstr$
Data1.Recordset.FindFirst “bts= ‘” & test & “‘” ‘& “switch='” & bos & “‘”
If Data1.Recordset.NoMatch Then Data1.Recordset.FindFirst “bts like’*” & test & “*'”
End Sub
thanks in advance for your help
Use this:
Data1.RecordSet = “select * from YourTable where TBS=” & Searchstr