Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attach/Upload Picture on Form 1

Status
Not open for further replies.

vasnas

Programmer
Jul 4, 2007
17
GR
hello, this should be fairly easy, but im very new to Access (ive got the 2007 version).

My field is a Hyperlink field for attaching photos (it's hyperlink and not OLE as photos may change in the future.

I just want a button (called Attach or Insert Picture etc) next to the Hyperlink field/box on the form, that opens a standard Windows dialog box (let's say directly at C:/Pictures folder) where the user browses for the picture file he wants, clicks OK and the name or pathname of the picture file appears in the field (as a hyperlink for the user to click on and view) and gets recorded/saved.

Other threads concerning this are a bit difficult/different from my little problem.

Thank you in advance!!! Vas
 
How are ya vasnas . . .

See my post here: thread702-1289131

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
thanks IceMan, i tried what you propose in your other thread but no luck. i opened the a new module - copied/pasted, and attached the other code on the execution button but nothing happens.

Any other ideas? Perhaps more precise steps into this module/code procedure you've created?
Please keep in mind that im completely useless with modules/macros/VB etc...this is my first database ever...

Cheers, Vas
 
vasnas . . .

Post the code in your button! . . .


Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Hello IceMan, i have returned back to my project and this little problem still persists...

I copied - pasted the code in a new module (changing txt->jpg and Text->Image). Then on the button i embedded the code: Me!DepartmentPhoto = BrowseFiles() . . . DepartmentPhoto is the TextBoxName of the (hyperlinked) field in question . . . but didnt know what to enter for variable = BrowseFiles() as i dont know what i should put for "variable), so i omitted it.

The button works, i choose a file, it puts the filepath on the textbox BUT then i CAN'T click on it to view it. It doesnt open the image file (even with right click...Open Hyperlink)???

Any ideas? What am i doing wrong? Do i have to change the Control Source of the textbox?

Do you think this is of any use (i dont get this though):
Please keep in mind im a real beginner with coding and Access. Thank you in advance for any help...!!!
Vas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top