UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Method To Propagate Image To All Forms Within Application, Access 2007    
 
   
jysharp2003@yaho...
post May 18 2019, 06:28 AM
Post#1



Posts: 39
Joined: 23-January 19



Hi everyone,
I have a user application that allows them to insert an image to customize their forms. I am configuring these images as a link to the folder application is residing.
IE: C:\schedule\ez1.jpg and C:\schedule\ez2.jpg. Users save their image as these folder path and overwrite.
Can someone tell me how to automate the link images on multiple forms? I have a bunch of forms and configuring the path for each form seems primitive and an upkeep struggle.
Thanks for the help. Jerry

Attached File(s)
Attached File  imageForForms.jpg ( 114.64K )Number of downloads: 7
 
Go to the top of the page
 
GroverParkGeorge
post May 18 2019, 07:05 AM
Post#2


UA Admin
Posts: 35,520
Joined: 20-June 02
From: Newcastle, WA


"...allows them to insert an image to customize their forms."

"...configuring the path for each form seems primitive and an upkeep struggle."

Yup, those two things seem to go together, I would think.

That said, I would look at a table-driven approach--usually a good option for tasks of this sort.

Give the users a configuration form to select among the options for the images they use. I don't know if you have a predefined set of approved images, or if it's anything goes, but either way should work.

Store the paths to the selected images in a table.

In the form's load event, retrieve paths to the users' selected images from that table and put them into the image controls.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
gemmathehusky
post May 19 2019, 11:44 AM
Post#3


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


2 ways

a) - write code to open each form in design mode, and modify the image. I assume it's like an image logo, rather than a form background, but it's the same idea. The issue is that you can't do this with a mde/accde

b) - add the image control yourself, with the image linked rather than embedded. Then at run time, read the image from a suitable location (settings table, or INI file, probably), and replace the linked image with the user's image.


--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
jysharp2003@yaho...
post May 21 2019, 05:12 AM
Post#4



Posts: 39
Joined: 23-January 19



Thanks you all for the time and feedback.
Comment "b) - add the image control yourself, with the image linked rather than embedded." is close to my issue. I do have around fifty forms and would like to avoid that paste of the linked path to the image on their C drive. Using LOGO in access seems to just insert image at Form Header. If I use the Hyperlink>>Linked path to C drive that works only for the form created.
What I am looking for is a mass insert to all forms of the linked images that the user saves on their application inwork. Image below shows user instructions to copy their image to our naming convention that will hook their logo to the application.
Is there a way to mass insert the C drive linked images to all my existing 50 forms or do I take the time to do this manually?
Thanks
Attached File(s)
Attached File  user_configurationForm.jpg ( 133.01K )Number of downloads: 6
 
Go to the top of the page
 
gemmathehusky
post May 21 2019, 05:28 AM
Post#5


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


you can't insert an image automatically to all forms.

Well you could, but you have to write vba to do it.

The problem is, let's say you decide to put the logo at the top left of each form.
some forms may already have data there.
some may not have a form header, just a detail
some may be continuous.

So you may need to redesign some of the forms to accommodate the logo.

You have to bite the bullet, and add the logos manually in the position you want.
You also have to modify the open event code, to update the image file.
50 forms will take about an hour or so, probably.


this sort of aircode
CODE
read filename from a resource
me.image1.source = filename


then at runtime, this all works seamlessly. The user replaces the image according to his personal settings.

There's still a potential issue. You design a square image, but one client has a long thin logo.


if you want to EMBED the image, then you can do that - but you need to have the image file, and you still need to open each form in design mode and update the logo path. Once it's embedded the user can't change it, other than by redesigning the form. Now if you issue a mde/accde, the user isn't able to change the embedded image, so to make this possible at RUN TIME - you have to do it with code and a linked image.

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
GroverParkGeorge
post May 21 2019, 08:41 AM
Post#6


UA Admin
Posts: 35,520
Joined: 20-June 02
From: Newcastle, WA


I think that one hour for 50 forms might be optimistic, but maybe I've just slowed down.

However, the other logistics issues Dave raised are really important. If you want to allow allow users to put their logo in your form, you can expect a significant variation in what is, and isn't, going to work out well.

That said, I still think the idea that makes the most sense is to put the path to the logo in a small table in your Access FE for that purpose. Call it tblLogoPath. It needs one field, the FULL path and file name for the image. Give the users a small form through which they can select the logo and enter the path to it on their machine. Now, when the form(s) load, use that path to find and put the logo in the image control on the form(s). If they want to change their logo, they only have to edit that field to point to the new image.




--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
gemmathehusky
post May 22 2019, 03:57 AM
Post#7


UtterAccess VIP
Posts: 4,725
Joined: 5-June 07
From: UK


Just going on from what George just said - if the path to the logo is stored in a backend table (which it probably should be) then all users will see the same file, so it needs to be in a shared folder.

if you want each user to be able to use their OWN file (eg, I allow users to change the background image used on all forms) then you need a slightly different was of storing an individual user's choice.


--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
jysharp2003@yaho...
post May 22 2019, 05:21 AM
Post#8



Posts: 39
Joined: 23-January 19



Great points experts. I will be smarter next application created. For now having the c:\ path in the image I insert will be dynamic enough. With web pages the header image follows all sub pages so I thought Access would be the same in the forms. Maybe next version.
Thank you all.
PS I want to thank you all and give credit. Not sure how to do that if you all want to give a follow up instruction I will check back and give credit where credit is due.
Go to the top of the page
 
jysharp2003@yaho...
post May 22 2019, 05:22 AM
Post#9



Posts: 39
Joined: 23-January 19



RIP Gemma!
Go to the top of the page
 
GroverParkGeorge
post May 22 2019, 08:12 AM
Post#10


UA Admin
Posts: 35,520
Joined: 20-June 02
From: Newcastle, WA


"...With web pages the header image follows all sub pages..."

Access runs on a WINDOWS machine, under OFFICE, and any comparison with web browser based functionality is likely to fall short of reality.

Keep in mind that Microsoft has tried at least twice to develop "Access for the cloud" and abandoned such attempts.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    22nd August 2019 - 09:50 PM