By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

Message Box Prompt

P: 12
I have a field named EMP_AMT_DED and I need for the amount entered into the text box to be 1250.00 and if the amount is anything less, I need a message box that prompts the user to explain why in the deduction history memo box. Once the user clicks OK on the prompt, I need to setfocus to the memo box. Simple but I can't think of it right off.

Thanks for any help...
Feb 13 '07 #1
Share this Question
Share on Google+
6 Replies


100+
P: 176
I have a field named EMP_AMT_DED and I need for the amount entered into the text box to be 1250.00 and if the amount is anything less, I need a message box that prompts the user to explain why in the deduction history memo box. Once the user clicks OK on the prompt, I need to setfocus to the memo box. Simple but I can't think of it right off.

Thanks for any help...
You can use the Validation Rule proprety that is in field's control propreties. Set it to
=1250.00
Use Validation Text proptery for message box pop-up explanation.
Feb 13 '07 #2

P: 12
You can use the Validation Rule proprety that is in field's control propreties. Set it to
=1250.00
Use Validation Text proptery for message box pop-up explanation.
I am not clear on how to do that. In the validation rule box, the expression builder opens. Can you give me specific steps on how to perform what you suggest I do.
Feb 13 '07 #3

P: 12
You can use the Validation Rule proprety that is in field's control propreties. Set it to
=1250.00
Use Validation Text proptery for message box pop-up explanation.
I think I have it Michael, thanks alot for the suggestion
Feb 13 '07 #4

P: 12
You can use the Validation Rule proprety that is in field's control propreties. Set it to
=1250.00
Use Validation Text proptery for message box pop-up explanation.
Ok, another problem, when the amount is entered and it is less than 1250.00 I want the field to keep whatever value is entered I just want an explain in the memo box. The way it is set up now, it won't allow the field to keep the entry.
Feb 13 '07 #5

100+
P: 176
Ok, another problem, when the amount is entered and it is less than 1250.00 I want the field to keep whatever value is entered I just want an explain in the memo box. The way it is set up now, it won't allow the field to keep the entry.
Ah, I see. So you shoudn't use validation rule as its function is to block enteries that are not in a certain creteria.

Go to the textbox Propreties, to the Event tab. Go to After Update row. A "..." button will show up, click on it. A VBA window will open. Make sure the following code is there:

Expand|Select|Wrap|Line Numbers
  1. Private Sub yourtextboxname_AfterUpdate()
  2.     If Me.yourtextboxname.Value = 1250 Then MsgBox "your message here"
  3. End Sub
Close the VBA window and try out the form.
Feb 13 '07 #6

NeoPa
Expert Mod 15k+
P: 31,186
You'd also need to use the .SetFocus() method of the Memo control.
Feb 14 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.