469,076 Members | 1,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,076 developers. It's quick & easy.

Why am I getting Runtime error 3010?

This database was working days ago, outputting a vocabulary list into a word document. Any idea why I'm getting runtime error 3010? I just switched from Windows XP to Windows 7 but I'm still using Microsoft 2007.

Expand|Select|Wrap|Line Numbers
  1.  'Create table containing individuals vocab
  2.     sqlStatement = "SELECT Vocab.WordID, Vocab.status, Vocab.session, Vocab.Date, Vocab.ChildID INTO Temp1 FROM Wordmast INNER JOIN Vocab ON (Wordmast.WordID = Vocab.WordID) WHERE (((Vocab.ChildID) =" & ChildID_txt & "));"
  3.     Set db = CurrentDb()
  4.     Set qd = db.QueryDefs("ChecklistQry")
  5.     qd.SQL = sqlStatement 'update the  query'
  6.     db.Execute "ChecklistQry"
  7.     'Create table with only latest entry
  8.     sqlStatement = "SELECT Temp1.WordID, Max(Temp1.Date) As maxDate INTO Temp2 From Temp1 GROUP BY temp1.wordID;"
  9.     Set qd = db.QueryDefs("Check2qry")
  10.     qd.SQL = sqlStatement 'update the query'
  11.     db.Execute "Check2Qry"
  12.  
Oct 5 '10 #1
1 3058
ADezii
8,800 Expert 8TB
How, and where are the Object Variables db and qd Declared?
Expand|Select|Wrap|Line Numbers
  1. 'Locally in Procedure
  2. Dim db As DAO.Database
  3. Dim qd As DAO.QueryDef
  4.  
  5. 'Private in Form Module
  6. Private db As DAO.Database
  7. Private qd As DAO.QueryDef
  8.  
  9. 'Globally in Standard Code Module
  10. Public db As DAO.Database
  11. Public qd As DAO.QueryDef
Oct 6 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Bill Patel | last post: by
reply views Thread by Yelena Varshal via AccessMonster.com | last post: by
7 posts views Thread by opie | last post: by
3 posts views Thread by Jim Armstrong | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.