ms access - Browse to a file location and add hyperlink to the recordset -


i found code allows me browse file location, select it, , add file path string text box on form. add file path string table in database.

can show me how that, please? in advance!

dim fdg object dim vrtselecteditem variant dim strselectedfile string  set fdg = application.filedialog(3) 'set fdg = application.filedialog(msofiledialogfilepicker)  fdg     .allowmultiselect = false     '.initialview = msofiledialogviewdetails         if .show = -1             each vrtselecteditem in .selecteditems 'only 1                     strselectedfile = vrtselecteditem                 next vrtselecteditem             me![txtselectedfile] = strselectedfile          else 'the user pressed cancel.     end if end  set fdg = nothing 

thanks response, paul. left out important detail in original question. file path needed added continuous subform because each record may have several files need linked. figured out. code used posted below:

dim fdg object dim vrtselecteditem variant dim strselectedfile string  set fdg = application.filedialog(3) 'set fdg = application.filedialog(msofiledialogfilepicker)  fdg     .allowmultiselect = false         if .show = -1             each vrtselecteditem in .selecteditems 'only 1                     strselectedfile = vrtselecteditem                 next vrtselecteditem                 me.child57                 .form.[imr_hyprlnk].setfocus                     runcommand accmdrecordsgotonew                 me.child57.form.[imr_hyprlnk] = strselectedfile             end         else 'the user pressed cancel.     end if end  set fdg = nothing 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -