fivesidecube
Programmer
I have a VBA script in MSAccess 2003 and I'm having some problems. Within the report's open event I'm trying to adjust a MSGraph.Chart's RowSource property. This sometimes works and sometimes doesn't.
The problem occurs with the assignment line "Graph32.RowSource"... the application raises error# 2455. If I play around with the watches (not changing values, just changing what I'm watching) in the debugger and hit run a few times, the assignment will just work with the adjusted RowSource.
Any ideas why it is taking time to get the properties?
The script:
The problem occurs with the assignment line "Graph32.RowSource"... the application raises error# 2455. If I play around with the watches (not changing values, just changing what I'm watching) in the debugger and hit run a few times, the assignment will just work with the adjusted RowSource.
Any ideas why it is taking time to get the properties?
The script:
Code:
Private Sub Report_Open(Cancel As Integer)
Dim rs As Recordset
Dim fldNumb As Integer
Dim sqlReq As String
Set rs = Application.CurrentDb.OpenRecordset("Question Averages Labelled_Crosstab")
sqlReq = ""
For fldNumb = 2 To rs.Fields.Count - 1
sqlReq = sqlReq & ",[" & rs.Fields(fldNumb).Name & "]"
Next fldNumb
rs.Close
sqlReq$ = "SELECT Null AS Expr " & sqlReq$ & " FROM [Question Averages Labelled_Crosstab];"
Graph32.RowSource = sqlReq
End Sub