Hi all,
I have written a report that is driven by a dialog where the user can pick any number of options to show on the report, and one option causes VB to change one of the Headers' control source and make it visible.
One particular selection causes Access to hang - I get the message
"formatting page, press ctrl+Break to stop", and of course ctrl+Break doesn't work, only thing that does is ctrl+Alt+Delete and end process!
Anyone have any ideas as to how I can see what is going on? It is not my code that clags - I have debugged the thing, and it gets all the way through the OnOpen routine just fine, and every other combination is ok, even when the same piece of code is run.
The database is only little, only about 200 records would be returned, and I have left it for a period of time (about 15 mins) just in case it is just slow.
I have already googled this, and only hits I got were people asking the same question two and four years ago, and nobody replied to them!
The filter on the report is the same as another time where the report runs fine, but in this instance, the header is fiddled with.
In another instance, the header is fiddled with in the same way, but the filter has more criteria... bit hard without showing the entire database and report, but I can paste the header code in...
Private Sub Report_Open(Cancel As Integer)
.
.
.
If Len(strFilter) > 0 Then
If MId(strFilter, 1, 5) = " AND " Then
strFilter = Right(strFilter, Len(strFilter) - 5)
End If
'(strFilter at this point reads: "MACtive=true and cactive=true and cvetab=true and cnrt=true")
Me.Filter = strFilter
Me.FilterOn = True
Else
Me.FilterOn = False
End If
Me.Caption = strRptTitle
Me.lblRptTitle.Caption = strRptTitle
'Show Headers if applicable
'0 CActive
'1 MActive
'2 CCName
'3 CNumber
'this is ok
If Not bUStatus Then
Me.GroupHeader1.Visible = False
End If
'this is ok
If Not bQStatus Then
Me.GroupHeader0.Visible = False
End If
If bCat Then
'this is ok
Me.GroupLevel(2).ControlSource = "CNumber"
Me.GroupHeader2.Visible = False
Else
'this is the problem child, but only sometimes
Me.GroupLevel(2).ControlSource = "CCName"
Me.GroupHeader2.Visible = True
End If
End sub
Any suggestions would be appreciated! I have compacted the db to see if this helps, but no...
I have written a report that is driven by a dialog where the user can pick any number of options to show on the report, and one option causes VB to change one of the Headers' control source and make it visible.
One particular selection causes Access to hang - I get the message
"formatting page, press ctrl+Break to stop", and of course ctrl+Break doesn't work, only thing that does is ctrl+Alt+Delete and end process!
Anyone have any ideas as to how I can see what is going on? It is not my code that clags - I have debugged the thing, and it gets all the way through the OnOpen routine just fine, and every other combination is ok, even when the same piece of code is run.
The database is only little, only about 200 records would be returned, and I have left it for a period of time (about 15 mins) just in case it is just slow.
I have already googled this, and only hits I got were people asking the same question two and four years ago, and nobody replied to them!
The filter on the report is the same as another time where the report runs fine, but in this instance, the header is fiddled with.
In another instance, the header is fiddled with in the same way, but the filter has more criteria... bit hard without showing the entire database and report, but I can paste the header code in...
Private Sub Report_Open(Cancel As Integer)
.
.
.
If Len(strFilter) > 0 Then
If MId(strFilter, 1, 5) = " AND " Then
strFilter = Right(strFilter, Len(strFilter) - 5)
End If
'(strFilter at this point reads: "MACtive=true and cactive=true and cvetab=true and cnrt=true")
Me.Filter = strFilter
Me.FilterOn = True
Else
Me.FilterOn = False
End If
Me.Caption = strRptTitle
Me.lblRptTitle.Caption = strRptTitle
'Show Headers if applicable
'0 CActive
'1 MActive
'2 CCName
'3 CNumber
'this is ok
If Not bUStatus Then
Me.GroupHeader1.Visible = False
End If
'this is ok
If Not bQStatus Then
Me.GroupHeader0.Visible = False
End If
If bCat Then
'this is ok
Me.GroupLevel(2).ControlSource = "CNumber"
Me.GroupHeader2.Visible = False
Else
'this is the problem child, but only sometimes
Me.GroupLevel(2).ControlSource = "CCName"
Me.GroupHeader2.Visible = True
End If
End sub
Any suggestions would be appreciated! I have compacted the db to see if this helps, but no...