Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acsess error message

Status
Not open for further replies.

gnanas

Technical User
Mar 20, 2003
22
AU
I received an access file via e-mail and when I tried to open The following error message came up

"Object variable or with block variable not set"

The same file was found to be functioning normally at the sender's computer. I then received a zipped copy and got the same error message. I am puzzled Can someone help?

I use Access 2000

Regards

Gnanas
 
Does the error message allow offer a button that says "Debug". If so, click on that and it will go to the actual line of code that is causing the error. If you can get that far, you may want to repost as it may need only a small adjustment, such as setting a proper reference.

Rob


 
Hi RobCPA,

No "Debug" button is available. After accepting the error message I can open the file and look at only the view list. I cannot bring up indiviual screens

Gnanas
 
The problem will be in a code module and is likely to be that a variable has either not been SET or a variable has not been dimmed within "Option Explicit". The sender's version of Access may be lower (or higher) and some key variable types may not need to be SET within their version or they may not have their code modules set to "Option Explicit"

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
I was thinking the same as xlbo, but thought it easier to determine exact cause if you could debug. Since it's working on the other computer, but not yours, I'm guessing that the program might have been coded using DAO, whereas Access2000 uses the ADO language of VBA instead. If that is the case, you need to go into any module, then choose Tools-References, then make add a reference to Microsoft DAO (3.51 or 3.6). Also, every dim statement for databases, recordsets, tabledefs, querydefs, etc, should be written like with DAO specifically referenced like:

dim db as DAO.database
dim rst as DAO.recordset


Rob




 
Tks for all the advise. I have passed your information to our IT personnel for investigation and iron out the bug

Gnanas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top