load path name into a control

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I want to be able to load a path and file name of a selected file into a
control on a form.

I have a command button on a form that calls the api to the open file dialog
from the Access Web website...

I select the file I want and I have a msgbox statement in the function of
the module that shows the path to the file as a string.

How can I load that string into a control on the calling form with
specifically referencing the form.

That way I can use it for other forms.

Thanks!
 
If you have the data in a msgbox, then you have the string you need. You just need to
place it somewhere else. To refer to a control on a form from someplace other than the
form, the form has to be open the use syntax similar to:

Forms!frmMyForm!ctlMyControl

or, if on a subform
Forms!frmMyForm!sfmSubformControl.Form!ctlMyControl
 
Back
Top