Article ID: 100367
Article Last Modified on 10/28/2003
Sub AAAAAA_Fix_Parser
Set MyDs = MyDB.CreateDynaset("...")
End Sub
You never need to execute the code in the Sub procedure or even call the
Sub procedure. Once you add the Sub procedure, the parser sees the Set
statement(s) before it tries to parse any other code, so it does not have
trouble with the global objects. After adding the Sub procedure, you do not
have to tweak the code every time you reload the project; you can do it
once and save it.
Global MyDs As Dynaset
Sub main ()
Dim MyDB As Database
Dim SQLStmt As String
Const DB_READONLY = 4 ' Set constant.
Set MyDB = OpenDatabase("BIBLIO.MDB") ' Open database.
' Set text for the SQL statement.
SQLStmt = "SELECT * FROM Publishers WHERE State = 'NY'"
' Create the new Dynaset.
Set MyDs = MyDB.CreateDynaset(SQLStmt, DB_READONLY)
form1.Show
End Sub
Sub Form_Load ()
Text1.Text = MyDs("state")
End Sub
Text1.text = MyDs("state").
Additional query words: buglist3.00 fixlist4.00 3.00
Keywords: kbbug kbfix KB100367