• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Browse and Save box

I'm using MS Access 2003 to store member profiles.  Currently, I have to save the members image to a folder then open Access.  Is there a way I can add a browse/upload button on the memberProfile from so that I can use Access to save the image to the folder?
0
chaddcarr
Asked:
chaddcarr
  • 5
  • 4
1 Solution
 
trainsdseCommented:
Add the Microsoft common dialog control to the form.

Add a button to the form and right-click--build event--code builder.
That opens up the visual basic editor.
Go to Tools--References and check the box next to Microsoft Scripting Runtime.

Paste this code into the buttonName_Click() sub procedure:

Me.CommonDialog0.ShowOpen
Dim fso As New Scripting.FileSystemObject
fso.CopyFile Me.CommonDialog0.FileName, "c:\whateverdirectoryYouWant\", True
Set fso = Nothing

Just change the c:\whateverdirectoryYouWant\ to your target directory.

Thomas
0
 
chaddcarrAuthor Commented:
Trainsdse,
I used the code but recieved a compile error (Method or Data member not found) on .ShowOpen
0
 
trainsdseCommented:
did you add the commondialog control to the toolbox and put it on the form?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
chaddcarrAuthor Commented:
Ah... how does one do that?
0
 
trainsdseCommented:
right click on the toolbox and choose components, then find the Windows Common Controls (I think it's the one from sp5), then it will be added to the toolbox, then put it on the form just like a textbox.
0
 
chaddcarrAuthor Commented:
trainsdse,

Got it.  Now it says I don't have the required liscense?  Any idea what thats all about?  I'm using XP Pro which I purchased.
0
 
trainsdseCommented:
That error is more about the copy of VB you have, do you have the educational version by chance?  (That's the only one I can think of that may not have support for the windows common controls, although I'm really not sure).

Thomas
0
 
chaddcarrAuthor Commented:
I'm using Microsoft Access 2003
Part of the Microsoft Office Professional Edition 2003
0
 
trainsdseCommented:
Can you paste in the exact error you're getting?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now