Contuous subform with buttons (1 Viewer)

Freddy

Abort, Retry or Ignore?
Local time
Yesterday, 23:33
Joined
Jul 25, 2002
Messages
28
I have a rather large list of reports that I want to present to the user as a continuous subform with buttons on each record for the user to print that particular report. The form draws from a table that has the report name and a flag indicating whether there is data for the report to display. Reports are being added continuously.

I want to disable the button if there is no data, when the flag is false. I use the on_open event to test and set the button state.

My problem is that contents of one record's flag sets the button states of the for all the records on the form. I put this test in various events and get the same result. I suspect I am not referencing the button finely enough when setting its state. Any suggestions?
 

Freddy

Abort, Retry or Ignore?
Local time
Yesterday, 23:33
Joined
Jul 25, 2002
Messages
28
Thanks for the quick reply. But the same effect. Selecting on one record sets the button state for all buttons, all reports.

Private Sub Form_Current()
Me.Name_Report_Button.Enabled = Me.Hit_by_Name
Me.SSN_Report_Button.Enabled = Me.Hit_by_SSN
End Sub

Private Sub View_Name_Report_Button_Click()
DoCmd.OpenReport Me.[Name Hit Report Name], acPreview
End Sub

Private Sub View_SSN_Report_Button_Click()
DoCmd.OpenReport Me.[SSN Hit Report Name], acPreview
End Sub
 

Attachments

  • sample1.gif
    sample1.gif
    16.5 KB · Views: 133
  • sample2.gif
    sample2.gif
    16.7 KB · Views: 95

Users who are viewing this thread

Top Bottom