Sausagefingers
Registered User.
- Local time
- Today, 08:16
- Joined
- Dec 14, 2006
- Messages
- 51
Hi,
I have a module with which I would like to offer the user an option to cancel their action using a dialog box. Being new to VB, I'm not quite sure how to implement this.
Here is the content of the module so far:
'------------------------------------------------------------
' isGroupedOnClick
'
'------------------------------------------------------------
Function isGroupedOnClick()
On Error GoTo isGroupedOnClick_Err
If (Forms!frm_deliveryTransactions!isGrouped = True) Then
Beep
MsgBox "Are You Sure You Wish To Make This Change?", vbQuestion, "Alterations To Route Structure Will Result..."
Forms!frm_deliveryTransactions!isGrouped_Label.ForeColor = RGB(200, 0, 0)
End If
If (Forms!frm_deliveryTransactions!isGrouped = False) Then
Forms!frm_deliveryTransactions!isGrouped_Label.ForeColor = RGB(0, 0, 0)
End If
isGroupedOnClick_Exit:
Exit Function
isGroupedOnClick_Err:
MsgBox Error$
Resume isGroupedOnClick_Exit
End Function
------------------
Can somebody please offer some advice/code. Specifically, where will I insert it within the module.
TIA.
I have a module with which I would like to offer the user an option to cancel their action using a dialog box. Being new to VB, I'm not quite sure how to implement this.
Here is the content of the module so far:
'------------------------------------------------------------
' isGroupedOnClick
'
'------------------------------------------------------------
Function isGroupedOnClick()
On Error GoTo isGroupedOnClick_Err
If (Forms!frm_deliveryTransactions!isGrouped = True) Then
Beep
MsgBox "Are You Sure You Wish To Make This Change?", vbQuestion, "Alterations To Route Structure Will Result..."
Forms!frm_deliveryTransactions!isGrouped_Label.ForeColor = RGB(200, 0, 0)
End If
If (Forms!frm_deliveryTransactions!isGrouped = False) Then
Forms!frm_deliveryTransactions!isGrouped_Label.ForeColor = RGB(0, 0, 0)
End If
isGroupedOnClick_Exit:
Exit Function
isGroupedOnClick_Err:
MsgBox Error$
Resume isGroupedOnClick_Exit
End Function
------------------
Can somebody please offer some advice/code. Specifically, where will I insert it within the module.
TIA.