Hi,
I have a database with a large number of reports based on a template.
Thanks to help previously provided by this forum (https://access-programmers.co.uk/forums/showthread.php?t=288559
) I have managed to link all of the images in the template so I can dynamically change or update them as required.
I have finally got round to rolling this out to all of the other reports based on this template however I have carried out further modifications resulting in quite a large amount of code for each report:
Instead of entering this code long hand into each report, I thought that it would be easier to place it in a module then simply call that module for each report. The only problem is I do not know enough about VBA (or any) coding to make this work.
Can anyone point me at a beginners guide which would show me how to do this?
Thanks in advance
I have a database with a large number of reports based on a template.
Thanks to help previously provided by this forum (https://access-programmers.co.uk/forums/showthread.php?t=288559
I have finally got round to rolling this out to all of the other reports based on this template however I have carried out further modifications resulting in quite a large amount of code for each report:
Code:
If Forms![formlocationcode]![live] = "Live" Then
Me.Header.Picture = DLookup("ImageLocation", "Images", "ImageName='A4 Header'")
Me.Accreditations.Picture = DLookup("ImageLocation", "Images", "ImageName='Accreditations'")
Me.CompanyAddressLine1.Visible = True
Me.CompanyAddressLine2.Visible = True
Me.CompanyAddressLine3.Visible = True
Me.CompanyPostCode.Visible = True
Me.CompanyTelephone.Visible = True
Me.CompanyEmail.Visible = True
Me.CompanyWebsite.Visible = True
Me.CompanyRegistration.Visible = True
Me.TestBox.Visible = False
Else
Me.CompanyAddressLine1.Visible = False
Me.CompanyAddressLine2.Visible = False
Me.CompanyAddressLine3.Visible = False
Me.CompanyPostCode.Visible = False
Me.CompanyTelephone.Visible = False
Me.CompanyEmail.Visible = False
Me.CompanyWebsite.Visible = False
Me.CompanyRegistration.Visible = False
Me.TestBox.Visible = True
End If
Can anyone point me at a beginners guide which would show me how to do this?
Thanks in advance