Hi,
Can anyone tell me why I have the following error on the "Select Statement" code when I open my form?:
Type Mismatch
Here is the code:
Private Sub Form_Load()
Dim dbname As String
Dim db As Database
Dim rs As Recordset
' Open the database.
dbname = "C:\Documents and Settings\Renee McCown\My Documents\Mylan\Equipment Application\Mylan NODBMenu"
If Right$(dbname, 1) <> "\" Then dbname = dbname & "\"
dbname = dbname & "Mylan_NODBMenus.mdb"
Set db = OpenDatabase(dbname)
Set rs = db.OpenRecordset("SELECT AssetsDrop.[PONumber] FROM AssetsDrop ORDER BY AssetsDrop.[PONumber]", dbOpenSnapshot)
Homer: But every time I learn something new, it pushes out something old! Remember that time I took a home wine-making course and forgot how to drive?
Marge Simpson: That's because you were drunk!
Homer: And how.
Can anyone tell me why I have the following error on the "Select Statement" code when I open my form?:
Type Mismatch
Here is the code:
Private Sub Form_Load()
Dim dbname As String
Dim db As Database
Dim rs As Recordset
' Open the database.
dbname = "C:\Documents and Settings\Renee McCown\My Documents\Mylan\Equipment Application\Mylan NODBMenu"
If Right$(dbname, 1) <> "\" Then dbname = dbname & "\"
dbname = dbname & "Mylan_NODBMenus.mdb"
Set db = OpenDatabase(dbname)
Set rs = db.OpenRecordset("SELECT AssetsDrop.[PONumber] FROM AssetsDrop ORDER BY AssetsDrop.[PONumber]", dbOpenSnapshot)
Homer: But every time I learn something new, it pushes out something old! Remember that time I took a home wine-making course and forgot how to drive?
Marge Simpson: That's because you were drunk!
Homer: And how.