Solved Problem with a flashing image (1 Viewer)

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
Good morning. I have a main form with a logo, which when entering some specific forms, blinks me.

I recorded a video explaining? the problem, and how I solved one of them, but teaching what I have not been able to fix, indicating what tests I have done.

My English is terrible, because it is not my language. I hope you appreciate my effort in making myself understood, and that with the video it is clear to you what the problem is and you can help me.

Video

Thank you very much

Greetings.
 

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
I have also tried to create the form again ((both the main menu and the dialog)) and change the path of the image:

From = Path () & "\" & DLookUp ("[Logo]"; "[T00Data]")
To = Path () & "\" & "Logotipo.png"

And keep doing the same
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:04
Joined
May 7, 2009
Messages
19,169
check the form in design view.
make sure that the Logo and other Controls on the form
don't Overlap (or touch each other).
if you have them as Group, remove the grouping.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:04
Joined
Feb 19, 2013
Messages
16,553
also check you do not have code which is requerying to form
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:04
Joined
May 7, 2009
Messages
19,169
also if you can edit the logo in photoshop so that it is centered.
then use the logo as the Background image of your form, Menu Pricipal.
 

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
@arnelgp: I am attaching another video where you can see how I select all the controls, so you can see that I do not have them attached to each other, and also how I group and ungroup them to make sure. On the other hand, I don't know how to do that of inserting the logo at the bottom of the menu.

Video

@CJ_London: In the first video, I remove all the code from both the main menu (leaving only the code to enter the dialog that gives the problem with the image) and the dialog, and it does not solve it.

Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:04
Joined
May 7, 2009
Messages
19,169
view Form1 in design view.
see the Picture of the form.
 

Attachments

  • logosample.zip
    35.3 KB · Views: 94

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
Thank you very much, but I am not convinced by that solution. This database is not for me, but for a customer, and I don't want to leave you something that you can't freely use. Let me explain: I have a data form, where the client can enter all the information related to their business, including the logo. I cannot pretend that the client, if tomorrow he wants to make a change to the logo, has to make a specific modification to the logo, but what I want is that he directly upload his logo and be displayed, without having to complicate the life to the customer, you understand me?

Still, as I have told you before, thank you very much for the inconvenience. You have been very kind to spend some time making an example for me.

A greeting.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:04
Joined
May 7, 2009
Messages
19,169
i thought it was about the logo is flashing?

you can still use the same technique.
you can use the Form's Picture property to set it.

if you want to save the Logo to a table, you use
Attachment field.

when the Main form opens, you Extract the picture from
the Attachment field and set the Form's Picture property
to the path where you extract the image.
 

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
Let's see, I've tried to do what you say. But instead of inserting it into the database through the configuration of the form itself, what I have done has been to do it by VBA. As I have the name of the file saved in a table, and on the other hand a function that tells me the path where the images folder is (or in the same path as the database, or in a specific path that the user can decide) , I use Me.Picture with that data, and it shows me the background image. However, it shows me on a specific screen, and I only want it to be displayed in the background, without having to create a specific image in Photoshop for it, which is what I told you in the previous message. You understand me?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:04
Joined
May 7, 2009
Messages
19,169
see this sample demo on how to change the Company Name and Logo.
it uses Attachment field. see Table1.
 

Attachments

  • logosample.zip
    139.7 KB · Views: 104

CJ_London

Super Moderator
Staff member
Local time
Today, 00:04
Joined
Feb 19, 2013
Messages
16,553
looking at your video, it looks like the images are on a continuous form which is a subform to the main form. If this is the case, you need to be aware of the order of event processing since on opening the main form, the subform can be queried several times. See this link


If you are not sure what is happening, disable all your code then in main form and subform open/load/current events put

debug.print "main form open event"

change the description for each form/event

You will find the subform opens first, then the main form, then assuming the linkchild/master properties are populated the subform will be requeried after the main form current event. If you have multiple subforms, this cycle will be repeated for each one.

You can over come this by a) not using the linkchild/master properties and b) not populating the subform recordsource (or set it to return no records) until the main form current event - at which point the main form current event would set the subform recordsource to the required filtered records.

e.g.

Subform recordsource - "SELECT * FROM someTable WHERE false"

main form current event

mysubformname.form.recordsource="SELECT * FROM someTable WHERE ID=" & me.ID
 

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
@arnelgp: Thank you very much. I have something similar to what you have done, but what I mean is that if you choose a logo on the button that you have placed to search for a logo, it will spread it all over the bottom of the form, and not in the center , in small.

@CJ_London: Thank you very much, but in the form you see with a subform I already managed to fix it. I mean the dialogues, where there is absolutely nothing that could be interfering, nor, obviously, subforms.
 

zelarra821

Registered User.
Local time
Today, 01:04
Joined
Jan 14, 2019
Messages
803
In the end I have found a solution. I have used this code, in case it works for someone:

Code:
    Application.Echo False
    'Your code
    Application.Echo True

@arnelgp: Thank you very much for your interest and dedication. I know why I did not put the image in the center, and that is that I had to select it in the property "image distribution" of the form.
 

Users who are viewing this thread

Top Bottom