G
Guest
Hello All,
I am rewriting a database that has been used to keep track of projects at
the office, which was a mess before. One report in the old database is used
at a weekly meeting, and it is desired that the format, etc not change. I
therefore copied and pasted the report into the new database, and changed the
control sources to point to a new query. The report looks fine, and contains
all the correct data, but it prompts for a single parameter "approved".
Apparently, it has also been doing that in the old database for the past 2
years, as well. Leaving a null value and selecting OK brings up the report
properly, but it is a nusiance that I would rather not have in there, since
the database is going to finally be done correctly.
I at first assumed that the parameter was contained in one of the controls
on the report. I wrote the following routine to execute on the report's Open
event, to try and track it down:
Private Sub Report_Open(Cancel As Integer)
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Or (ctl.ControlType = acCheckBox)
Then
Debug.Print ctl.ControlName & " - " & ctl.ControlSource
ElseIf (ctl.ControlType = acLabel) Then
Debug.Print ctl.ControlName & " - " & ctl.Caption
Else
Debug.Print ctl.ControlName
End If
Next
End Sub
Unfortunately, the output does not reveal the offending control. If this
parameter is not due to the source query (which it is not, as the query is
new to this database), and not due to a control on the report, where else can
it be coming from? I would really like to get this cleared up. Thanks,
Matt
I am rewriting a database that has been used to keep track of projects at
the office, which was a mess before. One report in the old database is used
at a weekly meeting, and it is desired that the format, etc not change. I
therefore copied and pasted the report into the new database, and changed the
control sources to point to a new query. The report looks fine, and contains
all the correct data, but it prompts for a single parameter "approved".
Apparently, it has also been doing that in the old database for the past 2
years, as well. Leaving a null value and selecting OK brings up the report
properly, but it is a nusiance that I would rather not have in there, since
the database is going to finally be done correctly.
I at first assumed that the parameter was contained in one of the controls
on the report. I wrote the following routine to execute on the report's Open
event, to try and track it down:
Private Sub Report_Open(Cancel As Integer)
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Or (ctl.ControlType = acCheckBox)
Then
Debug.Print ctl.ControlName & " - " & ctl.ControlSource
ElseIf (ctl.ControlType = acLabel) Then
Debug.Print ctl.ControlName & " - " & ctl.Caption
Else
Debug.Print ctl.ControlName
End If
Next
End Sub
Unfortunately, the output does not reveal the offending control. If this
parameter is not due to the source query (which it is not, as the query is
new to this database), and not due to a control on the report, where else can
it be coming from? I would really like to get this cleared up. Thanks,
Matt