Re: Query on the fly?(Bumped)
I have that done and it just runs throught the code and nothing happens.... Is there something else i'm missing?
HI again, i have been gone awhile, i've been looking for some cod eto work with this....
Have i got it right that the following code won't show anyresults. What can i do to show the recordset on a form?
Please help please
VB Code:
Dim rs As New ADODB.Recordset
Dim myconn As New ADODB.Connection
Dim sql As String
myconn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=MS Access Database;Initial Catalog=D:\Documents and Settings\christopher.lynch\Desktop\Complete Manual program\Manualrecords.mdb;" & " Pwd= " & Txtpassword.Text & " "
myconn.Open 'connection string'
sql = "SELECT * FROM [Total]"
If Len(TxtManualdate.Text) > 0 Then
sql = sql & " WHERE [Date] = #" & TxtManualdate.Text & "# "
Debug.Print sql
End If
rs.Open sql, myconn