Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


File picker for image help

File picker for image help

File picker for image help

I am making a frmCustomers form. It is bound to the tblCustomers. On the form I want to put an image box (do i use image boxes, bound/unbound object frames, or Active X controls?). I want the image to only display the image, not store it in the database. I've used the File Dialog Picker before but I can't figure out how to do it again. In my tblCustomers I have a field called CustImagePath that I want to use to store the paths to the images for each customer. How do I use an image and then store and use the path to display the image? I have the MS Office Object library referenced. The way I did it before was I had an image on the form, a text box that was bound to the CustImagePath on the table. The image was connected to the text box somehow (maybe control source?). When I clicked the cmdAddImage button, the file dialog box would appear, only one item was allowed to be selected, and then the path to that image was put into the text box and then the image displayed the photos. I have searched help files and can't find exactly how to do this, so any and all help would be greatly appreciated...Thank you, Dannie.

RE: File picker for image help

Office library has a FileDialog object that you have to customise and show. Before displaying the dialog you can set DialogType, InitialFileName, Filters, AllowMultiSelect, InitialView and other properties. Show method returns user action (action or cancel button selected), FileDialogSelectedItems returns a collection of strings with full paths and file names of selected items.
All you need to do is:
1) read initial path, sonfigure FileDialog,
2) show file dialog, get user action,
3) if not cancelled, read user selection and fill textbox and image according to the selection.
All 1-3 require VBA.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close