Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 27th, 2004, 01:08 PM
johnde johnde is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Sussex UK
Posts: 7 johnde User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Cancel Report when format detail throws error

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

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Cancel Report when format detail throws error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway