D
Dom
Hello All,
I have decide to create a custom MsbBox; I really
dislike the default MsgBox. However, I'm having
dificulties trying to figure out how obtain the response
value and continue with code in calling form.
OBJECTS & CODE ============================================
'''Table used to store all messages
Table = tblCustomMsgBox
sysMsgID = PrimaryKey
MsgBarTitle
MsgToDisplay
'''Form used as a custom MsgBox
Form = frmCustomMsgBox
txtSysMsgID
txtMsgBarTitle
txtMsgToDisplay
optMsgResponse = acOptionGroup
'''Calls CustomMsgBox from anywhere
Module = mdCustomMsgBox
Sub srOpenCustomMsgBox(stCustomMsgID As String)
Dim stCustomMsgBoxName As String
stCustomMsgBoxName = "frmCustomMsgBox"
If IsLoaded(stCustomMsgBoxName) Then
DoCmd.Close acForm,stCustomMsgBoxName,,acSaveNo
Else
DoCmd.OpenForm stCustomMsgBoxName, acNormal, ,
stCustomMsgID
End Sub
'''Open the form with it's MsgID # to ask if the user
'''wishes to exit or cancel exit.
Private Sub cmdExit_Click()
Call mdCustomMsgBox.srOpenCustomMsgBox
("[sysMsgID] = 1")
End Sub
===========================================================
This is my problem. If I do an If...Else...EndIf statement
after the Call of the module the code keeps on executing
with out the user selecting a yes or no. How can I make
the form wait until a value has been choosen. Is there
anyway to do this or am I going about this the wrong way ?
Any help is greatly appreciated, however, please keep in
mind I'm learning as I go. Thaks all.
Dominick
(e-mail address removed)
I have decide to create a custom MsbBox; I really
dislike the default MsgBox. However, I'm having
dificulties trying to figure out how obtain the response
value and continue with code in calling form.
OBJECTS & CODE ============================================
'''Table used to store all messages
Table = tblCustomMsgBox
sysMsgID = PrimaryKey
MsgBarTitle
MsgToDisplay
'''Form used as a custom MsgBox
Form = frmCustomMsgBox
txtSysMsgID
txtMsgBarTitle
txtMsgToDisplay
optMsgResponse = acOptionGroup
'''Calls CustomMsgBox from anywhere
Module = mdCustomMsgBox
Sub srOpenCustomMsgBox(stCustomMsgID As String)
Dim stCustomMsgBoxName As String
stCustomMsgBoxName = "frmCustomMsgBox"
If IsLoaded(stCustomMsgBoxName) Then
DoCmd.Close acForm,stCustomMsgBoxName,,acSaveNo
Else
DoCmd.OpenForm stCustomMsgBoxName, acNormal, ,
stCustomMsgID
End Sub
'''Open the form with it's MsgID # to ask if the user
'''wishes to exit or cancel exit.
Private Sub cmdExit_Click()
Call mdCustomMsgBox.srOpenCustomMsgBox
("[sysMsgID] = 1")
End Sub
===========================================================
This is my problem. If I do an If...Else...EndIf statement
after the Call of the module the code keeps on executing
with out the user selecting a yes or no. How can I make
the form wait until a value has been choosen. Is there
anyway to do this or am I going about this the wrong way ?
Any help is greatly appreciated, however, please keep in
mind I'm learning as I go. Thaks all.
Dominick
(e-mail address removed)