Article ID: 129925
Article Last Modified on 12/9/2003
Sub Form_Click()
Dim MyDB As Database, MyData As Recordset
Set MyDB = DBEngine.Workspaces(0).OpenDatabase("", False, False, _
"ODBC;DSN=pubs;Username=<username>;PWD=<strong password>;")
Set MyData = MyDB.OpenRecordset("Select * From authors",_
dbOpenDynaset, dbSQLPassThrough)
'other code here
If MyData.Restartable = True Then '<== This will always be false.
MsgBox "This RecordSet will be Requeried."
MyData.Requery
Else
MsgBox "This RecordSet will not be Requeried."
MyData.Close
End If
MyDB.Close
End Sub
Additional query words: 4.00 vb4win vb4all
Keywords: kbdatabase KB129925