473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FileDialog control not found

I have an Access2003 db that was converted from an Access2000 db. I would like to add a FileDialog control to a form but I don't see it in the Toolbox.

I added a reference to Miscrosoft Office 11.0 Objects. What more must I do?

Than you.
Jan 29 '08 #1
4 4155
sierra7
446 Expert 256MB
Hi
You need Microsoft Common Dialogue Control, which is an Actixe X component that ships with VB or other Developer tools. I don't think it is a part of Access

The file to look for is;- cmdlg32.ocx

S7
Jan 29 '08 #2
ADezii
8,834 Expert 8TB
I have an Access2003 db that was converted from an Access2000 db. I would like to add a FileDialog control to a form but I don't see it in the Toolbox.

I added a reference to Miscrosoft Office 11.0 Objects. What more must I do?

Than you.
If you are referring to the Microsoft Office File Dialog, which is shared by all Office Components, make the Reference as you already did, and write similar code to that below:
Expand|Select|Wrap|Line Numbers
  1. 'First, set a Reference to the Microsoft Office XX.X Object Library
  2.  
  3. Dim strButtonCaption As String, strDialogTitle As String
  4. Dim strHyperlinkFile As String
  5.  
  6. 'Define your own Captions if necessary
  7. strButtonCaption = "Save Hyperlink"
  8. strDialogTitle = "Select File to Create Hyperlink to"
  9.  
  10. With Application.FileDialog(msoFileDialogFilePicker)
  11.   With .Filters
  12.     .Clear
  13.     .Add "All Files", "*.*"     'Allow ALL File types
  14.   End With
  15.   'The Show Method returns True if 1 or more files are selected
  16.     .AllowMultiSelect = False       'Critical Line
  17.     .FilterIndex = 1 'Database files
  18.     .ButtonName = strButtonCaption
  19.     .InitialFileName = vbNullString
  20.     .InitialView = msoFileDialogViewDetails     'Detailed View
  21.     .Title = strDialogTitle
  22.   If .Show Then
  23.     For Each varItem In .SelectedItems 'There will only be 1
  24.       'Caption and Address of Hyperlink will be the same (Caption#Address)
  25.       strHyperlinkFile = varItem & "#" & varItem
  26.         Me![Link] = strHyperlinkFile
  27.     Next varItem
  28.   End If
  29. End With
Jan 30 '08 #3
sierra7
446 Expert 256MB
If you are referring to the Microsoft Office File Dialog, which is shared by all Office Components, make the Reference as you already did, and write similar code to that below:
Wow, that's far better than using the OCX which may not exist on every user's computer.
Thanks ADezii
Jan 30 '08 #4
ADezii
8,834 Expert 8TB
Wow, that's far better than using the OCX which may not exist on every user's computer.
Thanks ADezii
You are quite welcome, the code that I gave you is just a guideline, but it does list several Options for the File Dialog.
Jan 30 '08 #5

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

Similar topics

4
by: ulysses | last post by:
Hi, I use PyQt 3.8 non-commercial version in win32. I get a big question. I Can't show PY variable in QT filedialog as initially parameter. Code sample is following:...
3
by: John Field | last post by:
Hello, Is it possible to exclude certain files in a wx.FileDialog, so that the user won't see them and can't select them with the mouse in de File open window? I was thinking of somehow...
2
by: zino | last post by:
I'm using the following code to get the file name and path, but after the user click the file, Excel open it. I don't want the Excel file to open, all I need is to get the file name that the user...
3
by: David Bib | last post by:
Although I'm relatively new to Access VBA, I've done a lot of macro programming in Excel VBA. The problem I'm having is that I get a 'User Type not defined' error at this line - Dim fd As...
3
blazedaces
by: blazedaces | last post by:
I've taken a look at the class and you only seem to be able to set the file name, but not it's save type. Why is this? Here's some code if you want it, but it doesn't seem to have a method for...
2
by: akmagnolia | last post by:
Hello- I am trying to use the FileDialog object to allow users to select a file. When I compile, I get the User type not defined error at the first DIM statement. My code is copied right out of the...
16
by: technocraze | last post by:
Hi pals, I would like to know how to display the FileName of the selected file in the textbox and open it using FileDialog property. I have imported the necessary reference from the library -...
2
jamjar
by: jamjar | last post by:
I am trying to use the SaveAs type FileDialog to allow the user to enter a file name. It's only letting me choose exisiting files. Is there any way to use the FileDialog to allow the user to select...
2
by: sajtovi007 | last post by:
Hi, I've found code in thread: Using FileDialog property to open File and display FileName in a textbox but: 1. I do not know how to add it in to ACCESS 2003 database. 2. I have fields in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.