Randy,
Thanks for your posts.
I have tried it in three ways!
[tt]
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'SLP.Picture = LoadPicture("\pics\" & [Site Logo])
'SLP.Picture = ("\pics\" & [Site Logo])
SLP.Picture = [Site Logo]
End Sub
[/tt]
As you can see, I 'Commented one out while I tried the other.
All that happens, is when I press the "View" button to view the report, it jumps straight back to the design view (it flashes once - as if it tried to view it).
Any suggestions?
It's getting really frustrating!!!!
I also followed an example from the help file:
------------------------------
In a form or report, add an image control that is bound to a text field containing the paths to the pictures
[ol][li]If the field list isn't displayed, click
Field List on the toolbar. [/li]
[li]From the field list, drag the field that contains the locations of the pictures to the form or report.[/li]
[li]In the toolbox, click the
Image tool.[/li]
[li]On the form or report, click where you want to place the object. [/li]
[li]In the
Insert Picture dialog box, specify the path to any picture, and then click
OK. For example, you can type the path to the picture for the first record. [/li]
[li]Double-click the
form selector (form selector: The box where the rulers meet, in the upper-left corner of a form in Design view. Use the box to perform form-level operations, such as selecting the form.) or the
report selector (report selector: The box where the rulers meet in the upper-left corner of a report in Design view. Use the box to perform report-level operations, such as selecting the report.) to open the property sheet. [/li]
[li]Click the
Build button next to the
OnCurrent property box, and then click
Code Builder in the
Choose Builder dialog box. [/li]
[li]Create the following event procedure. Substitute the name of the image control on your form or report for ImageControlName and the name of the control containing the path for ImagePath. [/li]
[tt]Private Sub Form_Current()
On Error Resume Next
Me![ImageControlName].Picture = Me![ImagePath]
End Sub[/tt]
Note that if you are adding the event procedure in a report, the first line of the procedure will be the following:
[tt]Private Sub Report_Current()[/tt]
[li]On the
File menu in the Visual Basic Editor, click
Close and return to Microsoft Access. [/li]
[li]Click the control that is bound to the text field containing the location of the pictures, and then click
Properties on the toolbar to open the property sheet.. [/li]
[li]Click the
Build button next to the
AfterUpdate property box, click
Code Builder in the
Choose Builder dialog box, and create the following event procedure. Substitute the name of the image control on your form or report for
ImageControlName and the name of the control containing the path for
ImagePath. [/li]
[tt]Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageControlName].Picture = Me![ImagePath]
End Sub[/tt]
This event procedure enables you to add or change a picture location in Form view.
[li]On the
File menu in the Visual Basic Editor, click
Close and return to Microsoft Access. [/li]
[/ol]
Note To see an example of an image control that is bound to a field containing the locations of pictures, open the Employees form in the Northwind sample database.
------------------------------
But this didn't work. It says it's for forms and reports, but it only works on forms! There is no Items 6 & 7 above.
Pleeeeaaasssseee Help! It really is doing my head in!
Aubs