I have some code that I want to browse the location of a file, select it and add a path to the file path string What I would like to do is find the box on the form, adding the file path string to the table in my database
Can anyone show me how to do this, please? thank you in advanced! FDG = Due to the FDG object dim vrtSelectedItem version dim strSelectedFile string as set as FDG = Application.FileDialog (3) 'set FDG = Application.FileDialog (msoFileDialogFilePicker) FDG . AllowMultiSelect = false '. InitialView = msoFileDialogViewDetails .how to select -1 if for each vrtSelectedItem in selective items only' 1 strSelectedFile = vrtSelectedItem Next vrtSelectedItem me! [TxtSelectedFile] = strSelectedFile or press 'Cancel user'. Ends the end set FDG = nothing with
Your response, Paul Thank You for. I have left an important statement in my original question. Because the required file paths are added in a continuous sub-form, there may be several files that each record needs to be connected. I finally figured it out. The code I used is posted below:
dim FDG object dim vrtSelectedItem version dim strSelectedFile as set as string set FDG = Application.FileDialog (3) 'FDG = Fdg with Application.FileDialog Set (msoFileDialogFilePicker). Next Multilevel = Incorrect if Show = 1 for each vrtSelectedItem then. Selected 'only' 1 strSelectedFile = vrtSelectedItem Next vrtSelectedItem with me .Child57 .form. [IMR_HYPRLNK] .Setfocus Run Commands ACCMDCracksOgo NewMeam Child 57.Form. [Imr_hiaprlnk] = end with the StrSelectedFile end 'user pressed canceled. Ends end with set FDG = nothing
No comments:
Post a Comment