General discussion

Locked

Using class modules is separate mdb file

By jleather ·
Is there a way to use a class module in an other database? For example, I have project1 with class module referedClass and project2 (with a reference to project1) I have a class referingClass and attempting the following:

Dim mreferedClass as referedClass

Sub setup()
set mreferedClass = new referedClass
' . . .
end sub

I then create an instance of referingClass but this results, when running setup, in a user-defined type not defined error at the Dim statement.

Thanks in advance . . .

John

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by glyall In reply to Using class modules is se ...

usually a class module is written for just one class

the fields in the database will be different for each class module. The record length is also differnet.

If you are writing it and you made the record length the some for all databases it might work.
And the fields and the field length need to be also the some length.
This would be a major problem.
Hard to know what new fields, field lengths, and number of record will be in the future

good luck

Collapse -

by jleather In reply to

This is more of a programming issue not directly database related. I will try to rephrase the questoin a little better. Thanks.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums