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?
chaddcarrAsked:
Who is Participating?
 
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.