msoFileDialogFilePicker

G

Guest

I am trying to set up a database for an inventory with pictures in it. I have experienced significat difficulty getting the pictures to appear on the form. I have gone to the extreme of importing the "Employees" table and form from the Northwind sample. However, everytime I try to load the form I get the compile error indicating that "msoFileDialogFilePicker" variable has not been defined. I have tried using the search to find out where in Northwind it was defined, but cannot locate it.
Can someone help me figure out what the "msoFileDialogFilePicker" which is part of the "FileDialog(xxxxx)" is and where it can be defined?

Any assistance would be appreciated.
PS as you probably figured out I am pretty much of a novice.
 
D

Dirk Goldgar

TOMK said:
I am trying to set up a database for an inventory with pictures in
it. I have experienced significat difficulty getting the pictures to
appear on the form. I have gone to the extreme of importing the
"Employees" table and form from the Northwind sample. However,
everytime I try to load the form I get the compile error indicating
that "msoFileDialogFilePicker" variable has not been defined. I have
tried using the search to find out where in Northwind it was defined,
but cannot locate it. Can someone help me figure out what the
"msoFileDialogFilePicker" which is part of the "FileDialog(xxxxx)" is
and where it can be defined?

Any assistance would be appreciated.
PS as you probably figured out I am pretty much of a novice.

Press Alt+F11 to open the VB Editor. In that window, choose menu items
Tools -> References..., then look down the list for Microsoft Office
11.0 Object Library (it's 11.0 for Access 2003, 10.0 for Access 2002;
9.0 for Access 2000, 8.0 for Access 97 -- pick the right one). Put a
check mark in the box next to that reference, then close the dialog.

Now the "mso..." constants should be defined, and your code can use
them.
 
G

Guest

Dirk-

I can't thank you enough. You have no idea the frustration that was building not being able to get this to work. Your solution worked very well and hopefully I can get to work developing my app.

Many, many thanks
 
G

Guest

Dirk, thank you for the short and simple solution. I was strugling with this
for weeks now. I am in the part of the world where not myny people close by
to get assistance from.
 
D

Dirk Goldgar

CR Nigeria said:
Dirk, thank you for the short and simple solution. I was strugling
with this for weeks now. I am in the part of the world where not myny
people close by to get assistance from.

You're welcome, CR. You'll find these newsgroups a great resource.
 
Joined
Aug 20, 2009
Messages
1
Reaction score
0
damn Application.FileDialog(msoFileDialogFilePicker)

hey guys...
I've been reading about this everywhere and have tried lots of examples and always hit the same stupid problem....

I'm in access 2007, and when i try:

Dim fDialog As Office.FileDialog
Dim varFile As Variant

Set fDialog = Application.FileDialog(msoFileDialogFilePicker)

I get hit with "compile error: can't find project or library"... which would be ok if i wasn't 100% sure i had the
Microsoft Office 12.0 Object Library already selected!!!!! going a little mad here, the tooltips even recognize the code and prompt to fill in... still can't accept it's there. do you have to open and close a project to update the references or something?

Thanks in advance...
ChaosInACT
 
Joined
May 13, 2010
Messages
1
Reaction score
0
Distributed database problem with msoFileDialogFolderPicker

Although msoFileDialogFolderPicker compiles correctly when all the objects (tables, forms, queries..) reside in one Access 07 database file, when I split the database into two accdb files with the tables in a back-end accdb file which resides on a shared server and the forms/modules/queries in a front- end accdb file I get a compiler error. The offending code is:

With Application.FileDialog(msoFileDialogFolderPicker)

The compiler error is "Variable not defined" with msoFileDialogFolderPicker highlighted.

The rest of the project is happy with the splitting, just not the above line.

I downloaded this from "Access 2007 VBA, Programmer's Reference" by Hennig et al. As I said everything works fine when the front and back ends are in one accdb file. The purpose of this code is to allow the user to pick the location for saving an exported spreadsheet.

Any help will be much appreciated.

Thanks,
 

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

Top