I am new to VBA, i want to display images in a report however if there is no image for a particular record then i get an error message. I think i need some sort of If statement such as
If there is no image then still display the report with the information but not the image.
This is how i have set it up:
i have images stored in a folder on a shared area
I have included on the report an ImageFrame
In the group Header section ON FORMAT i have included the following VBA code
Me![ImageFrame].Picture = Me![ImagePath]
Inside the table i have included the path to the folder where all images are stored (Field Name = ImagePath)
The problem is if there is no image for that record then i get the error message:
Runtime error 13
Type Mismatch
Any help would be much appreciated. THANKS IN ADVANCE.
If there is no image then still display the report with the information but not the image.
This is how i have set it up:
i have images stored in a folder on a shared area
I have included on the report an ImageFrame
In the group Header section ON FORMAT i have included the following VBA code
Me![ImageFrame].Picture = Me![ImagePath]
Inside the table i have included the path to the folder where all images are stored (Field Name = ImagePath)
The problem is if there is no image for that record then i get the error message:
Runtime error 13
Type Mismatch
Any help would be much appreciated. THANKS IN ADVANCE.