Abdul-
It's not clear what you're trying to do. What is the blnOpening property or
field of the report? It looks like you're trying to see if a report is
open, and if it is, you just exit.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul Shakeel
Sent: Friday, March 29, 2013 6:51 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Report Open
I m using a dialog box to open a report using this code on dialog OK button
On Error GoTo Err_OK_Click
Dim strMsg As String, strTitle As String
Dim intStyle As Integer
If Not Reports![Monthly Sales].blnOpening Then Err.Raise 0
' Hide form.
Me.visible = False
Exit_OK_Click:
Exit Sub
Err_OK_Click:
strMsg = "To use this form, you must preview or print the Invoice
report from the Database window or Design view."
intStyle = vbOKOnly
strTitle = "Open from Report"
MsgBox strMsg, intStyle, strTitle
Resume Exit_OK_Click
How can I use the same dialog for multiple reports how to modify this code.
--
Regards,
Abdul Shakeel
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar