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

Access 2k Vs XP problem.

Status
Not open for further replies.

ianbar

Technical User
Jan 10, 2003
69
GB
Access 2000 has error with the following code:

Private Sub Form_Open(Cancel As Integer)
Forms!hyperlink_builder!txtname = Left(Forms!AddRecord!RaisedBy, 3)
Me!txtname = UCase(Me!txtname)
Forms!hyperlink_builder!txtdate = Format(Forms!AddRecord!DateRaised, "ddmmyy")
End Sub

I'm sure this used to work on my machine before it was re-formatted and I'm also sure i was using 2000 when I wrote it! Any ideas?
 
You didn't mentioned the error code or statement. But when you move your database to another computer or to a newer version of Access, make sure you check the libraries references. Go into VBA, click on Tools, click on References and make sure you have the latest libraries you need checked and in the right order (if you're using DAO, as you are, make sure the DAO lib. is near the top).

Neil
 
I have referenced the Microsfot DAO 3.6 Object Library as this was the only thing with DAO in it in the reference list. But it still fails to work!
 
Do you have a Null in the field?? Since you haven't bothered to use the NZ function incase there is a null and you have no error handling in there.

Vince
 
The error is:

Compile Error:

Can't find project or library.

So it's obvious that a library is missing. Habve I referenced the wrong thing above?
 
Open a code module, select tools, then references and check
the list of libraries you have selected. If Access has a
problem finding one of them, it will indicate this in this
list. Let us know how you get on.

Regards...
 
I checked all the references and none were missing except in the ones I have ticked:

Visual basic for applications
Microsoft Access 9.0 Object library
OLE Automation
Microsoft ActiveX data objects 2.1 library
Microsoft script runtime
MISSING: Microsoft Common Dialog Control 6.0 (SP3)
Microsoft DAO 3.6 object library

So there is a library missing, it currently points to C:\Windows\system32\COMDLG32.OCX. Is this the cause of my problem? How do i fix it?

By the way I'm using Win XP (if that makes any difference)

 
First off, make sure that you need this control
referenced. Uncheck it, then recompile. If you still
have a problem, then search for the file COMDLG32.OCX
on your hard drive. When/If you find it, note the
path and under tools references in Access, highlight the
Microsoft Common Dialog Control 6.0 (SP3) line and hit
Browse - browse to the path you found it at, double click
it and then recompile. See if that works. Let us know
how you get on.

Regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top