S
Stefan
I am opening a report from a form using the criteria on
the form for the filter.
I have the following code
Dim stPatient As String
stPatient = "[ChartNumberChoice]"
If IsNull(Me.ChartNumberChoice) = True Then
DoCmd.Close
DoCmd.OpenReport stDocName, acPreview
Else
'DoCmd.Close
DoCmd.OpenReport stDocName,acViewPreview, "", "[Chart
Number]=[Forms]![frm_OpenCopay]![ChartNumberChoice]",
acNormal
End If
If I leave the DoCmd.Close after the else
Chartnumberchoice loses its value and the filter does not
work. I tried to assign ChartNumberChoice to the variable
stPatient but I couldn't get that to work.
How can I close the form without losing the value in
ChartNumberChoice for filtering
Thanks in Advance
the form for the filter.
I have the following code
Dim stPatient As String
stPatient = "[ChartNumberChoice]"
If IsNull(Me.ChartNumberChoice) = True Then
DoCmd.Close
DoCmd.OpenReport stDocName, acPreview
Else
'DoCmd.Close
DoCmd.OpenReport stDocName,acViewPreview, "", "[Chart
Number]=[Forms]![frm_OpenCopay]![ChartNumberChoice]",
acNormal
End If
If I leave the DoCmd.Close after the else
Chartnumberchoice loses its value and the filter does not
work. I tried to assign ChartNumberChoice to the variable
stPatient but I couldn't get that to work.
How can I close the form without losing the value in
ChartNumberChoice for filtering
Thanks in Advance