Need Help for Northwind Example in office Xp

G

Guest

hi
I m using the Employees form in the Northwind Sample in Office Xp,
i have created a separete database & imported the tables , forms , macros
from the Sample Northwind Database...

After running the New Database , i am getting the following error in the
coding,,I haven't do any modifications in the code..

error is: Compile error " variable not defined " in the following line

--> With Application.FileDialog(msoFileDialogFilePicker) in

Sub getFileName()

Please help me to solve this error..

Thanks
 
G

Guest

Hi,

Have you set a reference to "Microsoft Office 10.0 Object Library" ? If not,
open VBE and select it under "Tools-->References".
 
G

Guest

thanks

it works fine

Sreedhar said:
Hi,

Have you set a reference to "Microsoft Office 10.0 Object Library" ? If not,
open VBE and select it under "Tools-->References".
 
G

Guest

hi

i can get the code running, But if i want to give the Default Path for the
open file dialog to be open when we run the code ,is it possible to modify
the code for our default location.

Suggest me to modify the code for the Default path


thanks
 
G

Guest

Hi Riyaz,

riyaz said:
hi
i can get the code running, But if i want to give the Default Path for the
open file dialog to be open when we run the code ,is it possible to modify
the code for our default location.
Suggest me to modify the code for the Default path

"CurrentProject.Path" leads you to the directory in which your database
resides. However, you can specify any other directory you want by feeding
the "InitialFileName" property of the file dialog with the path you want.
e.g.:
With Application.FileDialog(msoFileDialogFilePicker)
.InitialFileName = "c:\MyDefaultFolder" '---> Your default
directory

Hope that helps.
 
G

Guest

hi sreedhar

thanks for the help,its working..

and also i have posted another question in this forum for viewing the pdf
files
in the access forms...

same like image path stored in table i am trying to give pdf path in the
table and select it from the form .

whether we can do this on ms-access..

riyaz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top