Report View Different from Print Preview

JonNah

New member
Local time
Tomorrow, 05:56
Joined
Mar 3, 2014
Messages
3
Greetings All,

I'm having a problem with my report.
When data is input to my form and when i click on preview report, the preview report displays all results (my report source is from my query). However when I click on print preview a portion of data is missing. Basically is the check boxes I have in the report. They all are grayed out. These check boxes are unbounded and not related to the query. Basically I have an event procedure created upon clicking print preview as follows:

Private Sub PreviewMRO_Click()

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rptMRODataEntry", acViewReport

If MROReason = "Repair" Then
Reports!rptMRODataEntry.Repair = True
Else
Reports!rptMRODataEntry.Repair = False

End If

If MROReason = "Recertify" Then
Reports!rptMRODataEntry.Recertify = True
Else
Reports!rptMRODataEntry.Recertify = False

End If

If MROReason = "Test" Then
Reports!rptMRODataEntry.Test = True
Else
Reports!rptMRODataEntry.Test = False

End If

If MROReason = "Scrap" Then
Reports!rptMRODataEntry.Scrap = True
Else
Reports!rptMRODataEntry.Scrap = False

End If

If MROReason = "RDM" Then
Reports!rptMRODataEntry.RDM = True
Else
Reports!rptMRODataEntry.RDM = False

End If

If Certification = "CASA" Then
Reports!rptMRODataEntry.Others = "CASA"
Else
Reports!rptMRODataEntry.Others = " "

End If

If Certification = "EASA" Then
Reports!rptMRODataEntry.EASA = True
Else
Reports!rptMRODataEntry.EASA = False

End If

If Certification = "FAA" Then
Reports!rptMRODataEntry.FAA = True
Else
Reports!rptMRODataEntry.FAA = False

End If

If MDCCR = "Yes" Then
Reports!rptMRODataEntry.MDCCRYes = True
Else
Reports!rptMRODataEntry.MDCCRYes = False

End If

If MDCCR = "No" Then
Reports!rptMRODataEntry.MDCCRNo = True
Else
Reports!rptMRODataEntry.MDCCRNo = False

End If

End Sub

The selections are all drop down boxes in the form and upon selection it will populate the text boxes in my report. It seems to work perfectly upon clicking the preview report button but when I click on print preview the check boxes are grayed out.

I fairly new to access and the VBA code i wrote took a few days as I'm also new to it.

Appreciate any of your help.

Thank you...

JonNah
 
i cant check in detail - but you have to be careful when processing data during a print.

you process it all twice - once in the preview, and again in the print. does that look possible?
 
Greetings genna-the-husky,

Thank for the reply, but I’m not really sure what u mean by processing data during print. Sorry i'm still new to Access and VBA. Basically, I have a couple of combobox in a form. When a combobox selection is made, i want it to populate certain check boxes in my report. All seems to work fine with the above codes when i preview report, but when i go to print preview, the check boxes are greyed out as per attached file. Appreciate if you could help.

Thanks

JonNah
 

Attachments

Users who are viewing this thread

Back
Top Bottom