create a variable for all forms

E

Emanuel Violante

Hi,

I have a variable to link pictures to a form

Me.ImgStock.Picture = "s:\pictures\" & Me.FOTO

Everytime the picture path is modified, i need to enter in all forms and
change the path to
Me.ImgStock.Picture = "k:\pictures\" & Me.FOTO

Is there a way to change the picture path only once, and all the forms to
get the right path????

thanks in advance

--
Thanks,

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano
 
A

Arvin Meyer [MVP]

Sure, you can create a table with 1 record, Path or a global variable. The
table is preferred.

Add the table to every query that needs it in the form or report's
recordsource. Since there is only 1 record, the Cartesian product produced
will not change your dataset but it will add the column. Now, just add that
column to a hidden textbox on the form and you should by able to use
something like:

Me.ImgStock.Picture = Me.txtPath & Me.FOTO
 
E

Emanuel Violante

Thanks a lot Arvin,

I used your idea, but in a different way, i created the picture_path table
and in all forms i created a non visible textbox and used the dlookup function

=Dlookup("pict_path";"[picture_path]")

then i used your command line

Me.ImgStock.Picture = Me.pict_path & Me.FOTO


It helped me a lot, Thanks


--
Thanks,

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano


"Arvin Meyer [MVP]" escreveu:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top