RickHunter84
Registered User.
- Local time
 - Today, 00:11
 
- Joined
 - Dec 28, 2019
 
- Messages
 - 85
 
Hello friends,
I hope everyone is fine.
I'm having a problem when printing a report after processing a receiving goods. The idea is to print two reports, one of them is a barcoded label(no problem), and the other is a report summary of the item received into inventory, this is the one printing blank.
This is what I have been able to put together so far debugging. I put a break in the code to see if the values carry along the code, and they do, and the report prints with no problem. I removed the break , and I get the blank report
Any ideas why the code is behaving like this? so when I look at the step by step, prints, but when i do the rerun without code analysis, it doesn't print
The report is based out of a query (GoodReceiptsRpt).
Please let me know if you happen to have any clues, below is a sample of the code im using.
	
	
	
		
Best regards,
Rick
 I hope everyone is fine.
I'm having a problem when printing a report after processing a receiving goods. The idea is to print two reports, one of them is a barcoded label(no problem), and the other is a report summary of the item received into inventory, this is the one printing blank.
This is what I have been able to put together so far debugging. I put a break in the code to see if the values carry along the code, and they do, and the report prints with no problem. I removed the break , and I get the blank report
Any ideas why the code is behaving like this? so when I look at the step by step, prints, but when i do the rerun without code analysis, it doesn't print
The report is based out of a query (GoodReceiptsRpt).
Please let me know if you happen to have any clues, below is a sample of the code im using.
		Code:
	
	
	GRID= form_frmGoodReceiptsSub.GoodReceiptsID.value ' assigns value to print
                        DoCmd.Close acForm, "frmGoodReceiptsItemDetailsIOH"
                        
                        response = MsgBox("Would you like to receive another Line from this Purchase order?", vbYesNo + vbCritical, "Receive another item?")
                
                        If response = vbYes Then
                            MsgBox "Line received", vbInformation
                            
                            Form_frmGoodReceivingDetailsPOdetails.Requery
                            Form_frmGoodReceivingDetailsPOdetails.selectBt.Enabled = True
                            DoCmd.OpenReport "GoodReceiptsRpt", acViewPreview, , "[GoodReceiptsID]=" & GRID
                            DoCmd.OpenReport "RpPrintLabel", acViewPreview, , "SL=" & SLID
                            Exit Sub
                        End If
                        If response = vbNo Then
                            DoCmd.Close acForm, "frmGoodReceivingPoHeader"
                            DoCmd.OpenReport "GoodReceiptsRpt", acViewPreview, , "[GoodReceiptsID]=" & GRID
                            DoCmd.OpenReport "RpPrintLabel", acViewPreview, , "SL=" & SLID
                            MsgBox "Line received", vbInformation
                            
                            Exit Sub ' exit sub and ends the receiving process
                        End If
	Best regards,
Rick