Thanks for your reply Karl.
The title of the window is Enter Parameter Value.
The report is based on a table, no query, however, I have some stuff in the
On Open event of the report I will post.
Before I post the code, let me explain a bit.
I have 399 text boxes on my report, I am grabbing specific values from a
table and displaying them on the report in each of the textboxes, assuming
there is data in the table to fill the textboxes.
I tested the code, I debugged the whole thing, the values are being grabbed
correctly with the DLookup, I just keep getting these parmeter windows before
the report opens.
If I enter the number 8 or 9 as a parameter value, my report shows up with
8's or 9's as the values of all the text boxes so its really weird.
If you want a copy of the database I can send you one, its super tiny.
Anyway, thanks for your oncoming help!
Dim Day As String
Dim ValueCount As Integer
Dim DayCount As Integer
Dim TotalCount As Integer
Set rs = CurrentDb.OpenRecordset("Select * from Assessment where
ClinicalTrialId = '" & study & "'" & _
" and WeekId = '" & [Forms]![patient]![txtWeek] & "' and PatientId = '" &
GetActivePatient() & "'")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do While Not rs.EOF
For Each fld In rs.Fields
TotalCount = 0
If fld.Name = "DayId" Then
If IsNull(fld.Value) Then
Else
Day = fld.Value
DayCount = DayCount + 1
ValueCount = DayCount
While TotalCount < 57
TotalCount = TotalCount + 1
Me.Controls("text" & ValueCount).ControlSource = Nz(DLookup("Value" &
TotalCount, "Assessment", "WeekId = '" & [Forms]![patient]![txtWeek] & _
"' and PatientId = '" & GetActivePatient() & "' and DayId = '" & Day & "' and
ClinicalTrialId = '" & GetActiveStudy() & "'"))
ValueCount = ValueCount + 7
Wend
End If
End If
Next fld
rs.MoveNext
Loop
End If
Set fld = Nothing
rs.Close
Set rs = Nothing
LabelCount = LabelCount * 7
While LabelCount < 399
LabelCount = LabelCount + 1
Me.Controls("Text" & LabelCount).Visible = False
Wend
KARL said:
says Enter a Parameter value as the title of thewindow,
That is a new one on me.
What is the title of the window? Does it relate to anything else by name?
Post the SQL of the query feeding the report.
Hey there,
I do not have a parameter report, yet when I run my report I get 4 parameters
[quoted text clipped - 5 lines]
Any help is appreciated.
Thanks!
--
.