CurDir() in MS Access ???

sysHvV

Registered User.
Local time
Today, 07:45
Joined
Jun 13, 2005
Messages
20
I have a CurDir() question about MS Access: Thusfar I have used the following sub:
But Access keeps telling me that it cannot find the Project or Library and this is the structure of my database:

MultiMedia.mdb

This MDB contains everything but the forms and is considered the Front End

MuMedFront.mdb ----- MuMedFront.mdb ----- MuMedFront.mdb
These MDBs contain the back ends of including the forms and they are all linked to the Front End.
When opening a new instance of MuMedFront.mdb I get all kinds of error messages and I am puzzled in how to solve them. This is the first message and it takes place in CurDir()
Code:
Private Sub Form_Load()
    DoCmd.Maximize
    '  Ingebouwde werkbalken  verbergen.
    DoCmd.ShowToolbar "Formulierweergave", acToolbarNo
    DoCmd.ShowToolbar "Web", acToolbarNo
    DoCmd.ShowToolbar "Database", acToolbarNo
    dxProgDir = CurDir()   <----!!
    ixBreed = Me.Width
End Sub

I know that the library must be linked to the Database but its a riddle to me how to do that. I did already copy the whole thing to the new Database.

_________________________________________________________
Beauty resides in the eye of the beholder
 
Forms should always be in the Front End DB. Only tables in the Back End Db. Your question is a bit confusing as to what you actually have but have you checked that your VBA reerences are set up correctly. From the VBA editor select Tools --> References to see what is current
 
it is difficult to see what you need but here are some possibilities:

CurrentDb.Name -> C:\Documents and Settings\...\YourFile.mdb
Application.CurrentProject.Path -> C:\Documents and Settings\... (without \YourFile.mdb)
Application.CodeProject.Path -> C:\Documents and Settings\... (without \YourFile.mdb)

look up "path" or "dir" in vba help for other options. also check "fullpath" which deals a bit with references.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom