Invalid Path (runtime error 3044) (1 Viewer)

ColinH

Registered User.
Local time
Today, 05:07
Joined
Dec 5, 2008
Messages
23
I have a large, old application to handle biological recording which I've just moved from an old XP machine to Windows 7.
The path on the new machine is different to the path on the old machine.
The application is split into data and application parts, so the application contains a variable (strPath) which points to the data file. I've changed this to agree with the new installation and the Switchboard code runs correctly and opens the data file.
The Switchboard has a button to open a form to add a new record (button code is below) which, when clicked, gives the 'Invalid path' error on the DoCmd line in bold

Private Sub cmdNewRecord_Click()
'On Error GoTo Err_cmdNewRecord_Click
Dim stDocName As String
stDocName = "NewRecord"
DoCmd.OpenForm stDocName
Exit_cmdNewRecord_Click:
Exit Sub
Err_cmdNewRecord_Click:
MsgBox Err.Description
Resume Exit_cmdNewRecord_Click
End Sub

The application file opens the Access objects and linked tables, and runs the start up code and displays the Switchboard OK, so I don't see why I'm getting this error. The form NewRecord is, of course, in the same app.mdb file as the switchboard.

I'm stuck with what appears to be a simple error, any suggestions gratefully received.

ColinH
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:07
Joined
Feb 19, 2013
Messages
16,606
A couple of things

Have you compacted the db?

Have you tried opening the NewRecord form directly - i.e. not from the switchboard - if so, does it open OK

If you get the error (and I guess even if your don't) have you looked at any code that may exist in the form (initially look at open, load and current event)

Finally I notice you say it is a .mdb file. If you look on the web, there are a number of reported issues with running 2003 on windows 7.

Here is one solution you can try

http://www.sevenforums.com/microsoft-office/37975-office-2003-window-7-issue-solution.html

and another - basically suggesting the same thing

http://windowssecrets.com/forums/showthread.php/141398-ACCESS-2000-running-on-Windows-7

If you are running 2000 or earlier this link says it is not compatible with Win 7

http://database.ittoolbox.com/group.../access-l/access2000-problems-on-win7-4519193

However there are plenty who argue it will run, compatible or not
 

WayneRyan

AWF VIP
Local time
Today, 13:07
Joined
Nov 19, 2002
Messages
7,122
ColinH,

Also:

What is in strPath?

Have you checked that the Linked tables are really pointing to the BE?

Wayne
 

ColinH

Registered User.
Local time
Today, 05:07
Joined
Dec 5, 2008
Messages
23
Oh dear! The solution was so simple I really should have found it without bothering the group. I simply had to delete all the linked tables coming from the data file and relink them. Then it all worked perfectly.

What misled me was the error message in VBA which was "C:\Moths\Database\Plumes_data.mdb path not found". This caused me to search the code for hard-coded paths that I hadn't updated. I have now created strPath as a Public string variable with the correct path (C:\Users\Documents\Moths\Database) and substituted that throughout the code.

Many thanks to WayneRyan and CJ_London for their help.

Incidentally, I see that the "My Documents" folder appears as just "Documents" at Dos level, another quirk of Windows!
 

Users who are viewing this thread

Top Bottom