Computer being selective about code.

George Bowyer

Registered User.
Local time
Today, 23:04
Joined
May 17, 2004
Messages
50
I brought a db from my home pc to my work pc.

I set the db up on the work pc - everything functions normally.

I then import a module into a work db on the work pc from the one I have brought in from home.

When I try to run the work db it rejects parts of the code.

The same code in the same version of access on the same work pc still works fine in the db I brought in from home.

The errors are pretty basic. for example "Dim dbs as Database" gets a "User-type not defined" error.

Or :

smartbuttons(Thisform As Form)
Dim recclone As Recordset
Dim intnewrecord As Integer
Set recclone = Thisform.RecordsetClone

when sent "smartbuttons Me" from the form's on-current proceedure gives a 'Runtime error 13' - Type mismatch.

Yet it all still works fine in the home db on the same computer.

I'm very confused. What gives?
 
probably you're missing some library references on the work machine. from the VBE go to Tools->References and check to make sure the settings are the same on your work machine as on your home machine.
 
Hmm.

There isn't a "references" option in my Tools menu :confused:

EDIT : Ok, yep, "from the VBE". Found it now.

2nd EDIT : Ok. Got it running now. Thanks.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom