Show Image from cbo macro

kevin24

Registered User.
Local time
Today, 13:16
Joined
Feb 24, 2011
Messages
30
Hi,

Very new to macros.

I have a cbo which shows person and image file path.

I want to write a macro that will show the person's image when i click a name in the cbo box. A default person is shown when the form opens so a image is needed to accompany this.

Any help gratefully appreciated.
 
If you are using Access 2007+, you can use regular Picture control.

You need to organize your data source in such a way, that the field bound to Picture control contains the full image filename with path.
 
Hi,

I am using the following to define the image path in the combo box:-

SELECT [GoTo].[ID], [GoTo].[Person Name], [GoTo].[Image ID], [GoTo].[Image Name], Application.CurrentProject.path & "\Images\" & [Image Name] AS Path FROM [GoTo] WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Peron Name];

GoTo is a simple query.

The info qppears in the combo box list ok.

If I do a test form and use vb code the image appears.

However, I wish to use a macro for both form load and cbo_click.

I am already using a simple macro for form load.
 

Attachments

  • lform oad macro.JPG
    lform oad macro.JPG
    12.3 KB · Views: 151
Hi,

I am using version 2010, but this database is a 2007 version.
 
Reason for asking is that I have not used 2010 and was not familiar with the interface for macros you showed in your image.
 

Users who are viewing this thread

Back
Top Bottom