patrickd123
Patrickd123
- Local time
- Today, 18:11
- Joined
- Jan 21, 2007
- Messages
- 29
Hi,
Since I upsized my Access database to SQL server. One vital statement is not working anymore:
Private Sub Form_Load()
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * FROM TimeDot where ID = " & EmployeeID)
End Sub
The statement: Set rs = db.Open.........
returns following error: "Run-time error 91 -> Object variable or with block variable not set"
In fact, in the debugger I see that the value of db after the affectation from CurrentDB is "Nothing". Like if the CurrentDB is no more valid in sql server. Does anybody know which global variable I must now use?
Any help will be appreciated
Thanks
Since I upsized my Access database to SQL server. One vital statement is not working anymore:
Private Sub Form_Load()
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * FROM TimeDot where ID = " & EmployeeID)
End Sub
The statement: Set rs = db.Open.........
returns following error: "Run-time error 91 -> Object variable or with block variable not set"
In fact, in the debugger I see that the value of db after the affectation from CurrentDB is "Nothing". Like if the CurrentDB is no more valid in sql server. Does anybody know which global variable I must now use?
Any help will be appreciated
Thanks
Last edited: