Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Calling stored procedure from vba In Access ADP

Author  Topic 

projecttoday
Starting Member

31 Posts

Posted - 2010-03-04 : 21:47:36
I am converting an Access database to SQL Server. I am using an ADP database. I'm trying to execute an existing stored procedure with the following code:

Currentdb.Execute "Exec sproctblHoursworkedfrmTimelistbox @ppersonid = 11, @pdate = '02/10/2010'"

and I get the message

Object variable or With block variable not set. Anyone know why?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-05 : 10:13:30
where have you declare Currentdb?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

projecttoday
Starting Member

31 Posts

Posted - 2010-03-05 : 10:34:58
I didn't declare it. I've used Currentdb.Execute many times without declaring it.

Currentdb.Execute "SELECT ...
Go to Top of Page
   

- Advertisement -