SamDev said:
Hi - Below is the code - any help would be appreciated. I
experimented with creating a new form and still have no luck.
Thx!!!
Private Sub Print_Click()
With Me!JumpsScore
If IsNull(.Value) Then
MsgBox "Please select score for Jumps."
.SetFocus
Exit Sub
End If
End With
With Me!Spins
If IsNull(.Value) Then
MsgBox "Please select score for Spins."
.SetFocus
Exit Sub
End If
End With
With Me!FieldMoves
If IsNull(.Value) Then
MsgBox "Please select score for Field Moves."
.SetFocus
Exit Sub
End If
End With
If Forms![Skaters]![Level Type] = 3 Then DoCmd.RunMacro "Print
Pair Event"
If Forms![Skaters]![Level Type] = 1 Then DoCmd.RunMacro "Print
Single Event"
If Forms![Skaters]![Level Type] = 2 Then DoCmd.RunMacro "Print
Dance Event"
End Sub
Dirk Goldgar said:
I have removed the default values and still it prints when I don't
have a selection choosen in a group. I'm at a loss - any other ideas
or suggestions.
Did you remove the default values both from the table fields and from
the option group controls? When you look at the form before clicking
the button, does it show any selections in the option groups?
Please copy and paste the complete code from the command button into
a reply to this message. Maybe there's some problem with the code
that I can't see from your snippet.
I don't see anything wrong with that code, so -- assuming this is the
code being executed, and unless I've overlooked something -- it must be
that these option groups aren't Null. Are these controls bound or
unbound? To see what's going on, set a breakpoint on the Sub header
line and step through the code when the button is clicked. Check the
value of the option group as each " If IsNull(.Value) Then" statement is
executed. That may reveal something.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)