|
-
Feb 16th, 2002, 01:40 AM
#1
Thread Starter
Member
don't look if you don't want to help a beginner! :)
I will give a big kudos if anyone can remotely help me with this, much less understand what I need help on...here goes: whew, okay...i've got some option buttons, I need the user to satisfy both frames with option buttons. I know how to make a message box to ask the user to go back and click on the option button, but how do you take it step by step? Like, how do you make it so that if the user clicks on one frame, but doesn't fulfill the second one, the message box will come up. Right now, the message boxes all come right after one another when clicking the command button.
Wow! Could anybody understand that and help me?!
-
Feb 16th, 2002, 01:41 AM
#2
Member
I didnt understand a word you just said. Lay it out more plainly and tell us what you're actually trying to do, and what its for and then i might be able to help
-
Feb 16th, 2002, 01:42 AM
#3
Do ALL optButons, on each frame, need to selected by the user?
________
SexxyMolly
Last edited by Bruce Fox; Aug 14th, 2011 at 04:29 AM.
-
Feb 16th, 2002, 01:43 AM
#4
Member
lol bruce i like your quote at the bottom of your thing..rofl
-
Feb 16th, 2002, 01:45 AM
#5
-
Feb 16th, 2002, 01:48 AM
#6
Alternatly,
You could 'hide' the second Frame until the user has satisfied
your rquirments on the first.
________
PaoTheMax
Last edited by Bruce Fox; Aug 14th, 2011 at 04:29 AM.
-
Feb 16th, 2002, 01:50 AM
#7
Member
Do you even understand what he is trying to do? I sure dont...
-
Feb 16th, 2002, 01:51 AM
#8
Yes mate,
I have an idea what she is trying to do. 
________
Live sex
Last edited by Bruce Fox; Aug 14th, 2011 at 04:29 AM.
-
Feb 16th, 2002, 01:57 AM
#9
Addicted Member
If I understand correctly, you should be able to just use the GotFocus event.
ie:
Frame1 with 2 option buttons Opt1 and Opt2
Frame2 with 2 option buttons Opt3 and Opt4
VB Code:
Sub Opt3_GotFocus()
If Opt1.Value=False and Opt2.Value=False then
MsgBox "Please select from Frame1 options"
end if
End Sub
-
Feb 16th, 2002, 02:05 AM
#10
Originally posted by phase
lol bruce i like your quote at the bottom of your thing..rofl
He's one funny guy.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Feb 16th, 2002, 02:12 AM
#11
Thread Starter
Member
-
Feb 16th, 2002, 02:17 AM
#12
-
Feb 16th, 2002, 02:18 AM
#13
Similar to what Pickler said,
Place the check in the Command Button
VB Code:
Private Sub Command_Click()
If Opt1.Value=False And Opt2.Value=False And Opt2.Value=False And Opt3.Value=False Then
MsgBox "Please select an option"
End if
End Sub
________
Godess_N_Passion
Last edited by Bruce Fox; Aug 14th, 2011 at 04:29 AM.
-
Feb 16th, 2002, 02:29 AM
#14
Thread Starter
Member
okay, so this is the problem I'm encountering upon doing those statements. if i haven't filled out any of the frames it gives me a message stating i need to choose my class standing. that's great, but opon pressing the ok button, it goes to say i need to select my residency status, then goes to the next please provide a numeric value.
how do i separate them where each individual error message will display one at a time? when the error is actually made?
-
Feb 16th, 2002, 02:35 AM
#15
Post ur code 
________
Pepper cam
Last edited by Bruce Fox; Aug 14th, 2011 at 04:30 AM.
-
Feb 16th, 2002, 02:38 AM
#16
Addicted Member
Hi Licoricekisses,
Can you post what code you have.
-
Feb 16th, 2002, 02:42 AM
#17
Thread Starter
Member
Please don't laugh at me!! (and the hmm part i'm still figuring out. trying to limit the user with just number values. )
If optUndergrad.Value = False And optGrad.Value = False Then
MsgBox "Please select your class standing", vbInformation, "pa4"
End If
If optResident.Value = False And optNonresident.Value = False Then
MsgBox "Please select your resident status", vbInformation, "pa4"
End If
If txtNumberCredits.Text = "" Then
MsgBox "Please provide your number of credits", vbInformation, "pa4"
If IsNumeric(hmmm) Then
MsgBox "Please provide a numeric value", vbInformation, "pa4"
End If
End If
-
Feb 16th, 2002, 02:51 AM
#18
Addicted Member
Cool, no probs.
There is more than one way to fix this.
One way.
VB Code:
If optUndergrad.Value = False And optGrad.Value = False Then
MsgBox "Please select your class standing", vbInformation, "pa4"
elseIf optResident.Value = False And optNonresident.Value = False Then
MsgBox "Please select your resident status", vbInformation, "pa4"
elseIf txtNumberCredits.Text = "" Then
MsgBox "Please provide your number of credits", vbInformation, "pa4"
elseIf IsNumeric(hmmm) Then
MsgBox "Please provide a numeric value", vbInformation, "pa4"
End If
PS hmmm=txtNumberCredits.Text
Hope it helps
-
Feb 16th, 2002, 03:03 AM
#19
Thread Starter
Member
wow pickler! thanks a lot! i can't believe i forgot that elseif statement! i totally brain-farted!
i'm trying to call a function...why won't it let me do it? here, i'll show you...and don't laugh at my redundancy with the function! (how would you alleviate that anyway?)
Private Sub cmdComputeTuition_Click()
Dim Standing As String
Dim Residency As String
Dim NumberCredits As Integer
Dim TotalTuition As Currency
If optUndergrad.Value = False And optGrad.Value = False Then
MsgBox "Please select your class standing", vbInformation, "pa4"
ElseIf optResident.Value = False And optNonresident.Value = False Then
MsgBox "Please select your resident status", vbInformation, "pa4"
ElseIf txtNumberCredits.Text = "" Then
MsgBox "Please provide your number of credits", vbInformation, "pa4"
txtNumberCredits.SetFocus
Exit Sub
ElseIf Not IsNumeric(txtNumberCredits) Then
MsgBox "Please provide a numeric value", vbInformation, "pa4"
txtNumberCredits.SetFocus
txtNumberCredits.SelStart = 0
txtNumberCredits.SelLength = Len(txtNumberCredits.Text)
Exit Sub
Else
NumberCredits = Val(txtNumberCredits.Text)
End If
TotalTuition = Cost(Standing, Residency, NumberCredits)
lblDisplayTuition.Caption = Format(TotalTuition, "Currency")
End Sub
Private Function Cost(Standing As String, _
Residency As String, NumberCredits As Integer) As Currency
If (Standing = "Undergrad") And (Residency = "Resident") Then
Cost = 35 * NumberCredits
ElseIf (Standing = "Undergrad") And (Residency = "Nonresident") Then
Cost = 65 * NumberCredits
ElseIf (Standing = "Grad") And (Residency = "Resident") Then
Cost = 70 * NumberCredits
ElseIf (Standing = "Grad") And (Residency = "Nonresident") Then
Cost = 135 * NumberCredits
End If
End Function
WHAT AM I MISSING? hmmm...
-
Feb 16th, 2002, 03:14 AM
#20
-
Feb 16th, 2002, 04:02 AM
#21
VB Code:
Option Explicit
Private Sub cmdComputeTuition_Click()
Dim Standing As String
Dim Residency As String
Dim NumberCredits As Integer
Dim TotalTuition As Currency
If optUndergrad.Value = False And optGrad.Value = False Then
MsgBox "Please select your class standing", vbInformation, "pa4"
ElseIf optResident.Value = False And optNonresident.Value = False Then
MsgBox "Please select your resident status", vbInformation, "pa4"
ElseIf txtNumberCredits.Text = "" Then
MsgBox "Please provide your number of credits", vbInformation, "pa4"
txtNumberCredits.SetFocus
Exit Sub
ElseIf Not IsNumeric(txtNumberCredits) Then
MsgBox "Please provide a numeric value", vbInformation, "pa4"
txtNumberCredits.SetFocus
txtNumberCredits.SelStart = 0
txtNumberCredits.SelLength = Len(txtNumberCredits.Text)
Exit Sub
Else
NumberCredits = Val(txtNumberCredits.Text)
End If
If optUndergrad Then ' If Undergrad selected = TRUE, then Standing = "Undergrad"
Standing = "Undergrad"
Else
Standing = "Grad" ' If optUndergrad = FALSE, then Standing = "Grad"
End If
If optResident Then
Residency = "Resident"
Else
Residency = "Nonresident"
End If
TotalTuition = Cost(Standing, Residency, NumberCredits)
lblDisplayTuition.Caption = Format(TotalTuition, "Currency")
End Sub
Private Function Cost(Standing As String, _
Residency As String, NumberCredits As Integer) As Currency
If (Standing = "Undergrad") And (Residency = "Resident") Then
Cost = 35 * NumberCredits
ElseIf (Standing = "Undergrad") And (Residency = "Nonresident") Then
Cost = 65 * NumberCredits
ElseIf (Standing = "Grad") And (Residency = "Resident") Then
Cost = 70 * NumberCredits
ElseIf (Standing = "Grad") And (Residency = "Nonresident") Then
Cost = 135 * NumberCredits
End If
End Function
________
BUY MFLB
Last edited by Bruce Fox; Aug 14th, 2011 at 04:30 AM.
-
Feb 16th, 2002, 04:38 PM
#22
Thread Starter
Member
Thank you so much! I can't believe I forgot to do that...your help is much appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|