G
gmazza via AccessMonster.com
Hi there,
I have a report that when it runs it asks for parameters and I don't know why.
On my report are 399 text boxes named text1 to text399
In the On open event of the report I do some things that decide whether they
all show up or not, and assign values to the textboxes.
I have determined the problem is from one statement and I have dimmed
ValueCount appropriately.
Me.Controls("text" & ValueCount).ControlSource = Nz(DLookup("Value" &
TotalCount, "Assessment", "WeekId = '" & [Forms]![patient]![txtWeek] & _
"' and PatientId = '" & GetActivePatient() & "' and DayId = '" & Day & "' and
ClinicalTrialId = '" & GetActiveStudy() & "'"))
I even broke it down further and got rid of the Lookup and just went:
Me.Controls("text" & ValueCount).ControlSource = 2
and it still promtped me for parameter input.
Keep in mind that if I comment out this line then the report runs, just with
wrong data, so this line is making it prompt for a parameter.
Do you know why this is happening? Can I change my statement with different
code so it doesn't come up with a parameter?
Your answers are appreciated, thanks!
I have a report that when it runs it asks for parameters and I don't know why.
On my report are 399 text boxes named text1 to text399
In the On open event of the report I do some things that decide whether they
all show up or not, and assign values to the textboxes.
I have determined the problem is from one statement and I have dimmed
ValueCount appropriately.
Me.Controls("text" & ValueCount).ControlSource = Nz(DLookup("Value" &
TotalCount, "Assessment", "WeekId = '" & [Forms]![patient]![txtWeek] & _
"' and PatientId = '" & GetActivePatient() & "' and DayId = '" & Day & "' and
ClinicalTrialId = '" & GetActiveStudy() & "'"))
I even broke it down further and got rid of the Lookup and just went:
Me.Controls("text" & ValueCount).ControlSource = 2
and it still promtped me for parameter input.
Keep in mind that if I comment out this line then the report runs, just with
wrong data, so this line is making it prompt for a parameter.
Do you know why this is happening? Can I change my statement with different
code so it doesn't come up with a parameter?
Your answers are appreciated, thanks!