Run time error - 438

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Scenario,

Develeped a database using Access 2003

When I attempt to run a report on a station that has windows 2000,/office
2000,
I get the following error message: Run time error - 438 , object doesn't
support this property or method .. points to this line in a function :

Dim oAccessObject As AccessObject

Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
THIS LINE - If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If

End Function

How can I resolve this issue - any suggestions.? My boss is trying to move
as far away from the upgrade option. Meaning upgrading other office 2000
stations to office 2003.
 
Olu Solaru said:
Scenario,

Develeped a database using Access 2003

When I attempt to run a report on a station that has windows
2000,/office 2000,
I get the following error message: Run time error - 438 , object
doesn't support this property or method .. points to this line in a
function :

Dim oAccessObject As AccessObject

Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
THIS LINE - If oAccessObject.CurrentView <> acCurViewDesign
Then IsLoaded = True
End If
End If

End Function

How can I resolve this issue - any suggestions.? My boss is trying
to move as far away from the upgrade option. Meaning upgrading other
office 2000 stations to office 2003.

Yes, that constant and the CurrentView property of that object were
added in later versions.

I don't remember from where I liftet this one - probably Northwind or
the net

Public Function IsLoaded(ByVal strForm As String) As Boolean
Const conObjStateClosed = 0
Const conDesignView = 0
' Checks whether a form is open, and with a view
' different from design. Usage:
' debug.print IsLoaded("NameOfForm")

If SysCmd(acSysCmdGetObjectState, acForm, strForm) <> _
conObjStateClosed Then
If Forms(strForm).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If
End Function
 
Try this kind of thing:

If oAccessObject.IsLoaded Then
If Forms(oAccessObject.Name).CurrentView = 1 Then
IsLoaded = True
 
Back
Top