|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Team,
I have a report where a picture is imported by supplying filename. If there is no a picture I have a check box to just show a text box. If however there is not a picture filename and the check box is not checked I want to stop the report and close it. I can stop it but can not close the report. Any ideas ? This is the code I have in the format detail section of report. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) On Error GoTo err_Detail_Format Dim Str1 As String Dim Str2 As String 'If (Me!PhotoID = "" Or IsNull(Me!PhotoID)) And (Me!PhotoNOTAvailable = False) Then 'DoCmd.Close acReport, "watts asbestos page report master" 'DoCmd.CancelEvent 'End If If (Me!PhotoID = "" Or IsNull(Me!PhotoID)) And (Me!PhotoNOTAvailable = True) Then Me!nophototext.Visible = True Else Str2 = Me!PhotoID Str1 = Me!ReportPath Me!Picture.Picture = Str1 & "\" & Str2 End If If Me!BuildingID = 0 Then BuildingID.Visible = False BuildingDesc.Visible = False Else End If exit_Detail_Format: Exit Sub err_Detail_Format: MsgBox "No Picture WattsPage" Resume exit_Detail_Format End Sub Regards, John de |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Cancel Report when format detail throws error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|