Raine
11-04-2004, 01:06 AM
Hi, I'm new in VB programming. Now I am working on a project to make a database application. I use Microsoft Access and VB6. One of the functions that I need to create is the search function which is used to find a record or a list of records according to the user's specification.
I've tried to use SQL statements and ADO control but it won't work. The codes are:
Private Sub cmdStart_Click()
datScrhMaint.RecordSource = "Select * from Maintenance where Date = txtDate.Text "
datScrhMaint.Refresh
End Sub
The "txtDate.Text" is the user's input.
My question is: Can I use the user's input data as a parameter? How?
Thanks in advance.
I've tried to use SQL statements and ADO control but it won't work. The codes are:
Private Sub cmdStart_Click()
datScrhMaint.RecordSource = "Select * from Maintenance where Date = txtDate.Text "
datScrhMaint.Refresh
End Sub
The "txtDate.Text" is the user's input.
My question is: Can I use the user's input data as a parameter? How?
Thanks in advance.