Error opening report

wrekless

Registered User.
Local time
Today, 13:17
Joined
Jun 1, 2000
Messages
31
I am getting the WIERDEST error message.

When I try to open a report, any mode, preview or normal, I get a Run Time Error 438:

Object doesnt support this property or method.

What's weird about this, is that the report opens for certain records, but not for others, in this report.

Anyone know what this error is, and how it relates to my form???

Appreciate any help.
 
Could you post your code? - just the line that calls the report plus the report's record source.

Mike
 
On the Click event (printbutton):

Dim stDocName As String
stDocName = "Print Individual Detail Report Add"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.PrintOut acPages, 1, 2
DoCmd.Close acReport, stDocName

Here's the tricky part:

On the report, I've got an array with all the fieldnames (controls) in them.
(Example:

Dim AllFieldNames(1 To 39) As String

AllFieldNames(1) = "MANUF"
AllFieldNames(2) = "MODEL"
AllFieldNames(3) = "SCN"
AllFieldNames(4) = "CATID"
AllFieldNames(5) = "DWG_NO"
AllFieldNames(6) = "DWG_REV"
AllFieldNames(7) = "EQ_PKG"
etc.

On the report I have 4 fields for each element in the array (MANUF1, MANUF2,MANUF3, MANUF4) and so on. I only display the fields associated with what Unit we are on. So for unit 1, MANUF1, MODEL1, SCN1 are all made visible.

For intI = 1 To 39
fieldname = AllFieldNames(intI) & Me![UNIT]
Me.Controls(fieldname).Visible = True
Next intI

This works for units 1, 2 and 4. But for 3, I get the error message I posted above. This is really inconsistent. Is this some sort of Microsoft error???
 

Users who are viewing this thread

Back
Top Bottom