Ok thanks that's a start. I assume one can execute vba code via the on click
property. What I am missing is how to make a box in a form with check boxes
in it. We already have a form with lots of command buttons. I tried to add
a check box in that form but I seems to be missing something. All I could
get is a check box all by itself. Help indicated clicking on the check box
tool. If I drew a box on the form all I got was a check box. Help also
indicated that for a bound object I should drag the field from the field
list. The field list was grayed out :-(. I must be missing some easy steps.
TIA
I'm not sure I'm fully understanding what you want here.
Do you want the checkboxes to be such that only one can be checked at a
time, and that if one is checked and you check a different one, the one that
was checked becomes unchecked? If yes, then what you want is an option group
(frame), in which you put checkboxes. There is a wizard for this; be sure
that the magic wand button is depressed, and then click on an option group
in the toolbox (square with XYZ at top) and then click on the form; the
wizard will guide you through it.
If you want each checkbox to be independent, but you want to draw a "box"
around all the checkboxes, then use the Rectangle control to make the 'box'.

Signature
Ken Snell
<MS ACCESS MVP>
> Ok thanks that's a start. I assume one can execute vba code via the on
> click
[quoted text clipped - 97 lines]
>> >> >>>
>> >> >>> Seems access has this capability but I cant find it. TIA
colleen medin - 01 Mar 2005 19:30 GMT
Ok thanks for the info I was not aware how one starts the wizard.
I did find some code in help which does most of what i want.
However, this code must have the 'ok' button to invoke the vba code again.
What can i do to this code so that a single click in the checkbox will
invoke the vba code again? TIA
Dim I As Integer, dataprinted As Variant
With Assistant.NewBalloon
.Heading = "Regional Sales Data"
.Text = "Select the region(s) you want to print."
For I = 1 To 3
.Checkboxes(I).Text = "Region " & I
Next
.Button = msoButtonSetOkCancel
If .Show = msoBalloonButtonOK Then
dataprinted = 0
For I = 1 To 3
If .Checkboxes(I).Checked = True Then
' Code to print region data.
dataprinted = dataprinted + 1
MsgBox "Region " & I & " data printed."
End If
Next
If dataprinted = 0 Then MsgBox "No data printed."
End If
End With
> I'm not sure I'm fully understanding what you want here.
>
[quoted text clipped - 120 lines]
> >> >> >>>
> >> >> >>> Seems access has this capability but I cant find it. TIA
Ken Snell [MVP] - 01 Mar 2005 20:06 GMT
Put that code in the event procedure for the AfterUpdate event for the
checkbox.

Signature
Ken Snell
<MS ACCESS MVP>
> Ok thanks for the info I was not aware how one starts the wizard.
> I did find some code in help which does most of what i want.
[quoted text clipped - 166 lines]
>> >> >> >>>
>> >> >> >>> Seems access has this capability but I cant find it. TIA
colleen medin - 02 Mar 2005 17:36 GMT
Read the help on afterupdate & find myself in over my head.
More help would be appreciated.
The way i understand it when i create a balloon with check boxes. Like the
code below.
I should also insert a line: assistant.afterupdate = "[more code]"
then when the operator checks a box in the balloon the 'more code' routine
gets controll.
Let me know. TIA
BTW you have been a great help.
> Put that code in the event procedure for the AfterUpdate event for the
> checkbox.
[quoted text clipped - 30 lines]
> > End If
> > End With
Ken Snell [MVP] - 02 Mar 2005 18:01 GMT
I'm not sure where you are trying to use the 'afterupdate' expression that
you posted, but here is how to put code on an event such as AfterUpdate for
a checkbox control.
Open the form in design view. Click on the checkbox control. Click on the
Properties icon in the toolbar. Click on the Event tab. Go to the After
Update box, select [Event Procedure] from the dropdown list, click on the
three-dot button at far right side of the box, and select Code Window (if
asked). You'll then see a screen with three lines (second one will be blank)
[note that checkboxname will be replaced by the actual name of the checkbox
control]:
Private Sub checkboxname_AfterUpdate()
End Sub
In place of the blank line, put the code that you posted earlier:
Dim I As Integer, dataprinted As Variant
With Assistant.NewBalloon
.Heading = "Regional Sales Data"
.Text = "Select the region(s) you want to print."
For I = 1 To 3
.Checkboxes(I).Text = "Region " & I
Next
.Button = msoButtonSetOkCancel
If .Show = msoBalloonButtonOK Then
dataprinted = 0
For I = 1 To 3
If .Checkboxes(I).Checked = True Then
' Code to print region data.
dataprinted = dataprinted + 1
MsgBox "Region " & I & " data printed."
End If
Next
If dataprinted = 0 Then MsgBox "No data printed."
End If
End With
Save the form.

Signature
Ken Snell
<MS ACCESS MVP>
> Read the help on afterupdate & find myself in over my head.
> More help would be appreciated.
[quoted text clipped - 43 lines]
>> > End If
>> > End With