Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yes/No Message Box

Status
Not open for further replies.

Eddie1976

Instructor
Oct 29, 2002
4
US
I am trying to multiply a value by a decimal depending on whether the person choses yes or no. Below is the code I am currently using. Any help is greatly appreciated.

If Me.CreditorIDB.Value = 758 Then
msg = "Is this account over the credit limit?"
If MsgBox(msg, vbYesNo, "Over Limit") = vbYes Then
Me.OurPayment.Value = Me.Balance.Value * 0.03
Else
Me.OurPayment.Value = Me.Balance.Value * 0.02
End if

Thanks.
Ed
 

You can:
dim msg as string
msg = MsgBox"Is this account over the credit limit?"
If Me.CreditorIDB.Value = 758 Then
msg
elseif msg = 6 then
Me.OurPayment.Value = Me.Balance.Value * 0.03
Else
Me.OurPayment.Value = Me.Balance.Value * 0.02
End if
I think this would work. I had a similar problem. It worked out.
Thanks
Zishan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top