Nothing huge, just some flag sets for visibility on the report it's self
[blue]Option Compare Database
Option Explicit
Dim flag
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If flag = True Then
If DeficientAux = "X" Then
Me.Section(acDetail).Visible = True
Else
Me.Section(acDetail).Visible = False
End If
End If
End Sub
Private Sub Report_NoData(Cancel As Integer)
[green] 'MsgBox "No Data Available... The Report is empty..."[/green]
flag = False
End Sub
Private Sub Report_Open(Cancel As Integer)
flag = True
End Sub
[/blue]
There is however, an odd section of code that is supposedly called when the report closes: [purple] (this code is from the click event on a listbox)[/purple]
[green]'Waits until it's closed[/green]
[blue] While SysCmd(acSysCmdGetObjectState, acReport, Repor_names.Column(4)) <> 0
DoEvents
Wend
Call hide_window(hWndAccessApp, 0)[/blue][green] 'this is a user defined function that hides a certain window [/green]
[blue] me.visible = True[/blue]
Should I try putting a mainmenu.visible = true in the close event on the report and just comment out the code that waits for the report to close?