Changing images on a Continuous Form (1 Viewer)

Digi

Registered User
Joined
May 3, 2019
Messages
10
Hey,

I am not sure if what I am trying to do is even possible after some research on it however here goes.

I have created comment log database where the user fills in a form and selects a button to rate the customers mood, 1 to 5. Each button has a custom image on it angry to happy. The information is stored in the table as the number 1 to 5 based on which button was selected.

I then have a coninuous form that shows info from this table as a quick reference with a button to open up a much more detailed view of the customer info, however rather than show the number 1 to 5 of the customers mood I want to show the custom image again.

I've tried all sorts and come up against the issues that a continuous form is infact just one form therefore a change to one is reflected in all, but is there another way I can solve this?

Thanks in advance.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,753
Hi. Yes. This should not be a problem if you store the image externally to the database and simply store the path to the images. You can then bind the image control to it and no code is needed.
 
Last edited:

arnelgp

error reading drive A:
Joined
May 7, 2009
Messages
8,631
what is the fieldtype of your custom images. OLE (blob) or attachment?
 

MickJav

AWF VIP
Joined
Nov 28, 2005
Messages
1,256
I do this a lot


If Not IsNull(Me![Picture]) Then
Me.Imgage1.Picture = Me![FoldersLoc] & Me![Picture]
Me![CmdRemove1].Enabled = True
End If


Imgage1 has its picture type set to linked
Me![FoldersLoc] is the loaction of my main storage folders
Me![Picture] is the field in the table holding its name only
Me![FoldersLoc] & Me![Picture] these can be one but if you move the folder you will have to update all linked pictures


If your only going to have a few you could create a table with there names and link then use a combo to select happy, sad Etc
 
Last edited:

Digi

Registered User
Joined
May 3, 2019
Messages
10
I do this a lot


If Not IsNull(Me![Picture]) Then
Me.Imgage1.Picture = Me![FoldersLoc] & Me![Picture]
Me![CmdRemove1].Enabled = True
End If


Imgage1 has its picture type set to linked
Me![FoldersLoc] is the loaction of my main storage folders
Me![Picture] is the field in the table holding its name only
Me![FoldersLoc] & Me![Picture] these can be one but if you move the folder you will have to update all linked pictures


If your only going to have a few you could create a table with there names and link then use a combo to select happy, sad Etc
Hi, Thanks for the reply.

I am relatively new to all this...

What does the CmdRemove1 refer too? I have tried running this code in the on load of the continuous form and disabled the line referencing the CmdRemove, the image appears that the first record refers too, however this image is then the same for each result regardless of whether the field says angry, sad, neutral etc.

Appreciate your help.
 

arnelgp

error reading drive A:
Joined
May 7, 2009
Messages
8,631
here is another example (sample1 form), without using attachment field and instead using external image file.

before opening the db, extract the two images to "C:".
if you open tblNoAttachment table, the column ImagePath points to these images in drive C:

if you must move these images you must update this column to the correct path.
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom