How do I programmatically change a built-in picture on a control? (1 Viewer)

usr_X

Registered User.
Local time
Today, 14:07
Joined
Jun 9, 2009
Messages
26
Is there a way to do this? Thanks, Usr_X
 

akt01

Registered User.
Local time
Today, 20:07
Joined
Jun 19, 2003
Messages
21
in theory it should be easy

if [condition] = true, then me.picture = file1, else file 2
 

usr_X

Registered User.
Local time
Today, 14:07
Joined
Jun 9, 2009
Messages
26
Maybe I need to be more explicit. I want to be able to programmatically select one of the built-in pictures for a command button. When I return the cmdButton.Picture value for a built-in picture I get the value "(image)", but not a name or path or other selectable value. So, is there a way to programmatically change the image? Thanks, Usr_X
 

usr_X

Registered User.
Local time
Today, 14:07
Joined
Jun 9, 2009
Messages
26
How do I programmatically change a built-in picture?

Access 2007: When selecting a built-in picture on a command button on a form the picture property for any chosen image shows "(image)", i.e. there is no selectable file name/path for the picture. However, I think that there must be a way to programmatically change a built-in picture. Does anyone know how? Thanks in advance, Sincerely, Usr_X.
 

usr_X

Registered User.
Local time
Today, 14:07
Joined
Jun 9, 2009
Messages
26
Re: How do I programmatically change a built-in picture?

What I have found so far: As far as I can tell, Access 2007 doesn't name built-in pictures. There's no way to access a built-in picture with VBA. However, I have found a solution of sorts: Use the .PictureData property to select the picture from an invisible control on the form. For example, cmdVisible.PictureData = cmdInvisible.PictureData. It's not an ideal way (why clutter up the form with invisible controls) but it works. Any other solutions appreciated.
 

Users who are viewing this thread

Top Bottom