hozo
May 16th, 2000, 08:18 PM
Hey guys.. How do I change what the filter criteria is on a DB connection (jet3.5) after it's already open?
Here is form_load
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDataShape;Data PROVIDER=Microsoft.Jet.OLEDB.3.51; Data Source=C:\x\Customer.mdb;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select * from TroubleTicket where AssignedTo = '" & UCase(WhoAmI) & "' Order by TicketID ", db, adOpenStatic, adLockOptimistic
Later on I want to do something like this...
adoPrimaryRS.open "select * from TroubleTicket"
but I get errors. If I close and open the adoproimaryrs obj I also get errors. do I have to completely close the DB connection to get what I want? Can't you juse execute another command to change the recordset?
Here is form_load
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDataShape;Data PROVIDER=Microsoft.Jet.OLEDB.3.51; Data Source=C:\x\Customer.mdb;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select * from TroubleTicket where AssignedTo = '" & UCase(WhoAmI) & "' Order by TicketID ", db, adOpenStatic, adLockOptimistic
Later on I want to do something like this...
adoPrimaryRS.open "select * from TroubleTicket"
but I get errors. If I close and open the adoproimaryrs obj I also get errors. do I have to completely close the DB connection to get what I want? Can't you juse execute another command to change the recordset?