I have a report that includes buttons that link to external websites. Each button dynamically generates the URL by concatenating a base URL with a UID (from table), which opens the appropriate webpage (Species profile). The more rare / recently discovered a species is, the less likely that there's a species profile.
Rather than showing a button for EVERY species (as some will open a 'Species has no profile' generic webpage), I'd like to only show buttons where a full URL exists.
I'm assuming this would have to be tied to something like an OnLoad event for the report.
The following only works on the first record. If that's Null, it doesn't create any buttons. If the first value is notNull, it creates a button for every record. Seems like I need to loop through all records with this test, but I'm not sure how to accomplish this.
Code:
Private Sub Report_Load()
If IsNull(Me.ECOScode) Then
Me.ECOSbutton.Visible = False
Else
Me.ECOSbutton.Visible = True
End Sub

Thanks for any help you can offer,
Roy