Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BlankReport

Status
Not open for further replies.

raa44634

Technical User
Dec 13, 2001
34
0
0
US
I'm having a ridiculous issue.
I can't seem to get this to work in Access 2002:
E.g.,

If BlankReport = True Then ...
Else...
End If

It errors on the BlankReport wanting it defined. Did the report property change? I can't find anything in HELP besides the On NoData event.

Thanks!

- tony -
 
Either use the on no data event, or you could try the .hasdata property of the report either use me.hasdata in an event or just =hasdata in a controlsource.

Roy-Vidar
 
Hi,

I had the same problem.

If you know, the Access has a lot of properties that has to be declared to work!

For ex. the "AllowBypassKey" property!

Or the "AllowShortcutMenus" propety!

Once you declare this kind of property you can't declar it again - you will receive an error message (just enter into the sub the On Error Resume next line)


Here is an example in VB (it's same in Access but You don't have to declare the DAO):

Private Sub cmdGo_Click()
Dim db As dao.Database
Dim prp As dao.Property
Dim strProp As String
Dim i As Integer

If Len(Nz(Me.txtDB)) = 0 Then Exit Sub

Set db = DBEngine.OpenDatabase(Me.txtDB)

On Error GoTo Err_H

For i = 1 To 4
Select Case i
Case 1
strProp = "AllowBypassKey"
Case 2
strProp = "StartupShowDBWindow"
Case 3
strProp = "AllowFullMenus"
Case 4
strProp = "AllowShortcutMenus"
End Select
If Me.chkDeveloper Then
db.Properties(strProp) = -1
Else
db.Properties(strProp) = 0
End If
Next i
Unload Me
Exit Sub
Err_H:
Select Case Err.Number
Case 3270 'Property not found
CreateProp db, strProp
Resume
Case Else
MsgBox Err.Number & " " & Err.Description, vbCritical
Unload Me
Exit Sub
End Select
End Sub

Public Sub CreateProp(ByVal db As dao.Database, ByVal strProp As String)
Dim prp As dao.Property
Set prp = db.CreateProperty(strProp, dbBoolean, False, True)
db.Properties.Append prp
Set prp = Nothing
End Sub

Tibi
 
I'm still at a no-go for Access 2002/XP.
Any other insight?
 
I don't ever recall a report property named BlankReport.

Are you sure it wasn't some sort of user-defined variable or procedure??

Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top