Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rating: Thread Rating: 24 votes, 5.00 average. Display Modes
Old 01-11-2014, 05:49 PM   #1
ColinH
Newly Registered User
 
Join Date: Dec 2008
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
ColinH is on a distinguished road
Invalid Path (runtime error 3044)

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

ColinH is offline   Reply With Quote
Old 01-11-2014, 06:27 PM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 9,639
Thanks: 37
Thanked 3,128 Times in 3,036 Posts
CJ_London is a jewel in the rough CJ_London is a jewel in the rough CJ_London is a jewel in the rough CJ_London is a jewel in the rough
Re: Invalid Path (runtime error 3044)

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...-solution.html

and another - basically suggesting the same thing

http://windowssecrets.com/forums/sho...g-on-Windows-7

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

http://database.ittoolbox.com/groups...n-win7-4519193

However there are plenty who argue it will run, compatible or not
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
ColinH (01-12-2014)
Old 01-11-2014, 06:50 PM   #3
WayneRyan
AWF VIP
 
Join Date: Nov 2002
Location: Camarillo, CA
Posts: 7,071
Thanks: 6
Thanked 54 Times in 52 Posts
WayneRyan is a jewel in the rough WayneRyan is a jewel in the rough WayneRyan is a jewel in the rough
Re: Invalid Path (runtime error 3044)

ColinH,

Also:

What is in strPath?

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

Wayne

__________________
Pool Players Know All The Angles
WayneRyan is online now   Reply With Quote
The Following User Says Thank You to WayneRyan For This Useful Post:
ColinH (01-12-2014)
Old 01-12-2014, 07:12 AM   #4
ColinH
Newly Registered User
 
Join Date: Dec 2008
Posts: 19
Thanks: 5
Thanked 0 Times in 0 Posts
ColinH is on a distinguished road
Re: Invalid Path (runtime error 3044)

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!

ColinH is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 94 invalid use of null GRM-kenyette Modules & VBA 14 04-29-2011 03:48 PM
VBE Runtime Error - Invalid SQL statement firefly2k8 General 9 12-08-2010 06:34 AM
runtime error 3129, invalid SQL statement LB79 Modules & VBA 6 12-01-2009 09:03 AM
Question error 3044...make sure path is spelled correctly.. congo General 3 02-07-2009 04:19 AM
Error 3304 - Invalid Path fuzzygeek Modules & VBA 5 04-01-2003 08:44 AM




All times are GMT -8. The time now is 04:45 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World