heijmer
asked on
msgbox in access
Hi there
this is what I want to do
I am creating a form in an access database on which is a drop down box.
When a user selects a certain option from the drop box I want it to display a message.
Is this simple to do?
Thanks
this is what I want to do
I am creating a form in an access database on which is a drop down box.
When a user selects a certain option from the drop box I want it to display a message.
Is this simple to do?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - tried that but when I switch back to form veiw and select the item on the list that I want to generate a message
nothing happens
Code:
Option Compare Database
Private Sub combo0_afterupdate()
If Me.combo0 = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
End Sub
nothing happens
Code:
Option Compare Database
Private Sub combo0_afterupdate()
If Me.combo0 = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
End Sub
ASKER
where do i find the name of the combo box???
(sorry if that sounds stupid!)
(sorry if that sounds stupid!)
ASKER
where do i find the name of the combo box???
(sorry if that sounds stupid!)
is this correct?
(sorry if that sounds stupid!)
is this correct?
ASKER
where do i find the name of the combo box???
(sorry if that sounds stupid!)
is this correct?
Option Compare Database
Private Sub combo0_afterupdate()
If Me.Outcome = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
End Sub
(sorry if that sounds stupid!)
is this correct?
Option Compare Database
Private Sub combo0_afterupdate()
If Me.Outcome = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
End Sub
in the design view of the form, select the combo box and hit F4
select the Event tab, locate the After Update event and click on the Dropdown arrow to the right and select {Event Procedure]
then click on the (...) , this will take you to the VBA window wher you will place the codes
If Me.combo0 = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
again, you need to change "combo0" to the name of the combo box
select the Event tab, locate the After Update event and click on the Dropdown arrow to the right and select {Event Procedure]
then click on the (...) , this will take you to the VBA window wher you will place the codes
If Me.combo0 = "Issue Around Cost" Then
MsgBox "Have you found out if the customer could be pursuded by a 10% Discount?"
End If
again, you need to change "combo0" to the name of the combo box
ASKER
Fantastic - thats really great.
One more thing is there a way that you maximum the msgbox so it take up the whole screen?
Thanks buddy
One more thing is there a way that you maximum the msgbox so it take up the whole screen?
Thanks buddy
No, the message box is dependent on the amount of message you want to display but it has its limitations too.
you can create own "message Form" to show the message and maximize it on open, but it is not advisable
ASKER
Ok thanks for all your help - 500 points coming your way!!!!!!!!!!!!!!!!!!!!!!
private sub combo0_afterupdate()
if me.combo0="some options" then
msgbox "Hello"
end if
end sub