So i have been doing a bit of research into class modules but i just can't seem to wrap my tiny brain around it.
I have a form with a combo box. cboPermitType.
There a 3 options in the combo
A1
B2
C3
I found the following code online which i am tying to incorporate into my form which allows me to edit the message box in a custom way instead of using a form.
When a user click A1 from the drop down they will be prompted with a yes/no message box with custom buttons. Instead of saying "Yes" it says "Add New", and instead of saying "No" It says "View Existing".
If a user clicks Add new for A1 i opens the corresponding form and so on for the other options.
How would i incorporate this into an on click event of my combo.....?
Thanks.
I have a form with a combo box. cboPermitType.
There a 3 options in the combo
A1
B2
C3
I found the following code online which i am tying to incorporate into my form which allows me to edit the message box in a custom way instead of using a form.
Code:
Public Function TestMyMessageBox()
Dim nResult As Integer
Set MyMsgBox = New cls_MessageBox
With MyMsgBox
'// you can have any combinations of buttons(up to 3!)
.Button1Text = "Print Report"
.Button2Text = "Quit"
'.Button3Text = "3rd Button" '// not used here
.BoxStyle = Information
.Prompt = "Testing my MyMsgBox"
.Title = "Title here"
End With
nResult = MyMsgBox.MessageBox '// Loads MessageBox
Select Case nResult
Case 1:
DoCmd.OpenForm "frm_Form1"
Case 2:
DoCmd.OpenForm "frm_Form2"
Case 3:
DoCmd.Close
End Select
End Function
When a user click A1 from the drop down they will be prompted with a yes/no message box with custom buttons. Instead of saying "Yes" it says "Add New", and instead of saying "No" It says "View Existing".
If a user clicks Add new for A1 i opens the corresponding form and so on for the other options.
How would i incorporate this into an on click event of my combo.....?
Thanks.