By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 1,910 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Access 2003 error shows after change DAO reference?

P: 1
After I changed some reference in the menu of vba editor, it gave me the "error- please check that a valid file path was entered" when I press a command button on my form. What 's wrong with it and how to handle it. Thanks in advanced.
Oct 7 '07 #1
Share this Question
Share on Google+
2 Replies


nico5038
Expert 2.5K+
P: 3,072
Just open the VBA code again and select Debug / Compile
Now check the statement when an error is returned and post it here.
Looks like you need to reactivate a reference, the statement might indicate which...

Nic;o)
Oct 7 '07 #2

ADezii
Expert 5K+
P: 8,597
After I changed some reference in the menu of vba editor, it gave me the "error- please check that a valid file path was entered" when I press a command button on my form. What 's wrong with it and how to handle it. Thanks in advanced.
  1. You can run this little Diagnostic Code to see if any References are Broken:
    Expand|Select|Wrap|Line Numbers
    1. Dim ref As Reference
    2.  
    3. For Each ref In Application.References
    4.   If ref.IsBroken Then
    5.     Debug.Print "Reference " & ref.Name & " is broken!"
    6.   Else
    7.     Debug.Print "Reference " & ref.Name & " is in tact!"
    8.   End If
    9. Next
    Sample OUTPUT from my PC:
    Expand|Select|Wrap|Line Numbers
    1. Reference stdole is in tact!
    2. Reference DAO is in tact!
    3. Reference Excel is in tact!
    4. Reference Office is in tact!
    5. Reference MSACAL is in tact!
    6. Reference Scripting is in tact!
    7. Reference ADOX is in tact!
    8. Reference SHDocVw is in tact!
    9. Reference ADODB is in tact!
    10.  
  2. If you are referencing both ADO and DAO, you must disambiguate (nice word ain't it?) the Object Reference by explicitly stating it as in:
    Expand|Select|Wrap|Line Numbers
    1. Dim MyDB As DAO.Database
    2. Dim rstPersonnel As ADODB.Recordset
  3. If you removed a Reference that you shouldn't have, you would typically get the Error:
    Expand|Select|Wrap|Line Numbers
    1. Compile error:
    2. User-defined type not defined
Oct 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.