Open another report if field is null

dtaylor89

Registered User.
Local time
Today, 18:45
Joined
Jan 16, 2013
Messages
25
I have two reports. Short and Long. The second report has one field which is an picture embedded. I'm tryint to do something like, If field is null open short report else if field is not null open second report. Also account for the fact that multiple records can be selected to print. There could be a case where there a 2 records with attachments and two records without. How can can I display this to tje user using two seperate reports?

Please Help!!!
 
Hi,
Let me first understand your problem.

The two reports are they bound to the same recordset ie table or query?
 
Yes they are.
 
What you need is a user form with a combobox to select an option tied to the field. Then a command button on the form. The OnClick event of the command button should include a code to evaluate the value of the field, if null open short report, else open long report.
 
I have some code like that
If (Me.Print) = 0 Then 'Checkbox
Call MsgBox("Please make sure you select a metric to print!")
End If
If (Me.Metric_Display) = 0 Then
DoCmd.OpenReport "rptMetrics", acViewPreview, "", "", acNormal

Else

DoCmd.OpenReport "rptMetricsLong", acViewPreview, "", "", acNormal
End If

My Error says: Object doesn't support this property or method.
 
Or is there some way that I can have one report with two pages and If field is null dont print second page else print both?
 

Users who are viewing this thread

Back
Top Bottom