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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relinking front end to back. Newbie 1

Status
Not open for further replies.

Plumes

Technical User
Jan 27, 2004
18
AU
Hi All

I'm new to the VB side of Access so I have some code off the net to relink the front end of a db to the back. The problen I'm having is that wherever database is a variable:

eg Dim dbCurr As Database

it returns the error "user-defined type not defined".

Am I supposed to replace this with something?

Matt
 
Whilst in any code module of the database:

(a) Select Tools, References from the menu bar
(b) Select and tick the latest Microsoft DAO Object Libray (probably 3.6), and click OK.
(c) In your declaration add the DAOprefix; eg.
[tt]
Dim dbCurr As DAO.Database
[/tt]

Note that you only need to do steps a and b once per database, as it remembers which library references are in its list.

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Cheers Steve

I'm slowly getting there with the VB but the reasons for the problems are never obvious.

Thanks again much appreciated.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top