A
Abe Hendin
I'm completely flummoxed (baffled) by the fact that the MsgBox marked
below simply refuses to display the buttons and icon I call for. All I
get is OK, which breaks the functionality. I've tried republishing the
form, clearing the cache, and changing the icon and button calls, but
both MsgBoxes in this sub just don't respond. I don't see anything wrong
with the syntax, but wouldn't mind the obvious being pointed out. :-|
Any ideas? Thanks!
Abe
--------
My code:
Sub cmdReloadFromDataRepository_Click()
strCurrSec = Item.UserProperties("StudentClassSection").Value
If Not strCurrSec = "None" Then
'BAD MSGBOX FOLLOWS: DISPLAYS NO ICON, AND OK ONLY
intR = MsgBox("You are about to update the charges listed on the
Payment Setup " & _
Chr(13) & "and Payment Details tabs. No changes will be made to
the " & _
Chr(13) & "amounts paid, but the amounts due will be updated to
reflect " & _
Chr(13) & "changed charges." & _
Chr(13) & Chr(13) & "This action cannot be undone. Continue?", _
vbYesNoCancel & vbExclamation, _
"Reload charges?")
If intR = vbYes Then
intR = MsgBox("Apply change to all members of " & strCurrSec &
"?" & _
Chr(13) & Chr(13) & "YES: Update entire class; NO: Update just
this student." & _
"This action cannot be undone. Continue?", _
vbYesNoCancel & vbExclamation, _
"Apply update to entire class?")
If intR = vbYes Then 'do all class members
Set objCurrFolder = Item.Parent
Set objAllItems = objCurrFolder.Items
strFilter = "[StudentClassSection] = " & Chr(34) & strCurrSec &
Chr(34)
Set objClassMembers = objAllItems.Restrict(strFilter)
For Each Item In objClassMembers
Call SetUpPaymentDetails
Item.Save
Next
Set objCurrFolder = Nothing
Set objAllItems = Nothing
Set objClassMembers = Nothing
ElseIf intR = vbNo Then 'just do current student
Call SetUpPaymentDetails
End If
End If
Else
intR = MsgBox("You may update charges only with class members!", _
vbOKOnly & vbCritical, _
"Invalid item")
End If
End Sub
below simply refuses to display the buttons and icon I call for. All I
get is OK, which breaks the functionality. I've tried republishing the
form, clearing the cache, and changing the icon and button calls, but
both MsgBoxes in this sub just don't respond. I don't see anything wrong
with the syntax, but wouldn't mind the obvious being pointed out. :-|
Any ideas? Thanks!
Abe
--------
My code:
Sub cmdReloadFromDataRepository_Click()
strCurrSec = Item.UserProperties("StudentClassSection").Value
If Not strCurrSec = "None" Then
'BAD MSGBOX FOLLOWS: DISPLAYS NO ICON, AND OK ONLY
intR = MsgBox("You are about to update the charges listed on the
Payment Setup " & _
Chr(13) & "and Payment Details tabs. No changes will be made to
the " & _
Chr(13) & "amounts paid, but the amounts due will be updated to
reflect " & _
Chr(13) & "changed charges." & _
Chr(13) & Chr(13) & "This action cannot be undone. Continue?", _
vbYesNoCancel & vbExclamation, _
"Reload charges?")
If intR = vbYes Then
intR = MsgBox("Apply change to all members of " & strCurrSec &
"?" & _
Chr(13) & Chr(13) & "YES: Update entire class; NO: Update just
this student." & _
"This action cannot be undone. Continue?", _
vbYesNoCancel & vbExclamation, _
"Apply update to entire class?")
If intR = vbYes Then 'do all class members
Set objCurrFolder = Item.Parent
Set objAllItems = objCurrFolder.Items
strFilter = "[StudentClassSection] = " & Chr(34) & strCurrSec &
Chr(34)
Set objClassMembers = objAllItems.Restrict(strFilter)
For Each Item In objClassMembers
Call SetUpPaymentDetails
Item.Save
Next
Set objCurrFolder = Nothing
Set objAllItems = Nothing
Set objClassMembers = Nothing
ElseIf intR = vbNo Then 'just do current student
Call SetUpPaymentDetails
End If
End If
Else
intR = MsgBox("You may update charges only with class members!", _
vbOKOnly & vbCritical, _
"Invalid item")
End If
End Sub