Having a problem with the following code:
Private Sub cmdPrintPreview_Click()
If Forms!frmWantedReports!cboGenres = "Chart" Then
DoCmd.OpenReport "rptWantedChart", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Dancehall/Reggae" Then
DoCmd.OpenReport "rptWantedDancehall", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Electro/Rap" Then
DoCmd.OpenReport "rptWantedElectro", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Funk/Soul" Then
DoCmd.OpenReport "rptWantedFunk", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Hardcore/Rave" Then
DoCmd.OpenReport "rptWantedHardcore", acPreview
Else
If Forms!frmWantedReports!cboGenres = "House" Then
DoCmd.OpenReport "rptWantedHouse", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Indie" Then
DoCmd.OpenReport "rptWantedIndie", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Jungle/Drum&Bass" Then
DoCmd.OpenReport "rptWantedJungle", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Techno/Trance" Then
DoCmd.OpenReport "rptWantedTechno", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Turntablism" Then
DoCmd.OpenReport "rptWantedTurntablism", acPreview
Else
If Forms!frmWantedReports!cboGenres = "TV/Films" Then
DoCmd.OpenReport "rptWantedTV", acPreview
Else
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
DoCmd.Close
End Sub
When the cmd button is pressed the report opens for a milli-second then disappers?!?
Any help with this would be greatly appreciated.
Thanks in advance
Private Sub cmdPrintPreview_Click()
If Forms!frmWantedReports!cboGenres = "Chart" Then
DoCmd.OpenReport "rptWantedChart", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Dancehall/Reggae" Then
DoCmd.OpenReport "rptWantedDancehall", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Electro/Rap" Then
DoCmd.OpenReport "rptWantedElectro", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Funk/Soul" Then
DoCmd.OpenReport "rptWantedFunk", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Hardcore/Rave" Then
DoCmd.OpenReport "rptWantedHardcore", acPreview
Else
If Forms!frmWantedReports!cboGenres = "House" Then
DoCmd.OpenReport "rptWantedHouse", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Indie" Then
DoCmd.OpenReport "rptWantedIndie", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Jungle/Drum&Bass" Then
DoCmd.OpenReport "rptWantedJungle", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Techno/Trance" Then
DoCmd.OpenReport "rptWantedTechno", acPreview
Else
If Forms!frmWantedReports!cboGenres = "Turntablism" Then
DoCmd.OpenReport "rptWantedTurntablism", acPreview
Else
If Forms!frmWantedReports!cboGenres = "TV/Films" Then
DoCmd.OpenReport "rptWantedTV", acPreview
Else
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
DoCmd.Close
End Sub
When the cmd button is pressed the report opens for a milli-second then disappers?!?
Any help with this would be greatly appreciated.
Thanks in advance