Access 2007 ControlSource code in Report causing shut down

S

sterling

The following code worked successfully in Access 2002 & 2003 but for some
reason, the lines that contain ControlSource are causing Access 2007 to shut
down and error out. Any suggestions you have would be greatly appreciated.
In short, I’m using a combo box on a form “ReportCenter†to change the
GroupLevel and textbox values on a report. If I comment out the lines with
ControlSource the code runs successfully, if any one of them are uncommented,
Access 2007 shuts down and restarts.

'Group 1
If Forms![ReportCenter]!T2GroupCheck1 = True And
Forms![ReportCenter]!T2GroupDescendCheck1 = False Then
'Me.GroupLevel(0).ControlSource = Forms![ReportCenter]!T2GroupOption1
'Me.Group0_H1.ControlSource = Forms![ReportCenter]!T2GroupOption1


Me.Group0_H3.Caption = Forms![ReportCenter]!T2GroupOption1
Me.Group0_H2.Visible = False
Me.Group0_H3.Visible = True


Me.Group0_F1.ControlSource = Forms![ReportCenter]!T2GroupOption1
Me.Group0_F3.Caption = Forms![ReportCenter]!T2GroupOption1
Me.Group0_F2.Visible = False
Me.Group0_F3.Visible = True


Else
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top