Conditional input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello: I have two fields, called "qty rejected" and the other "DMR number".
Both of these are number fields. I want to write a code that when the qty
rejeted is filled in, a note pops up stating that there must be a DMR number
input. Would someone please help me? Seems simple enough, but I can't seem
to get it to respond.
Thanks
 
Hello: I have two fields, called "qty rejected" and the other "DMR number".
Both of these are number fields. I want to write a code that when the qty
rejeted is filled in, a note pops up stating that there must be a DMR number
input. Would someone please help me? Seems simple enough, but I can't seem
to get it to respond.
Thanks

Code the [qty rejected] control's AfterUpdate event:

MsgBox "The DMR number field must be filled in!"
[DMRNumber].SetFocus
 
fredg: thanks for the response. It is working great, but one more thing. I
don't want them to be able to exit the form until the DMR field is filled in,
how do I write code for this?

fredg said:
Hello: I have two fields, called "qty rejected" and the other "DMR number".
Both of these are number fields. I want to write a code that when the qty
rejeted is filled in, a note pops up stating that there must be a DMR number
input. Would someone please help me? Seems simple enough, but I can't seem
to get it to respond.
Thanks

Code the [qty rejected] control's AfterUpdate event:

MsgBox "The DMR number field must be filled in!"
[DMRNumber].SetFocus
 
Use the Form_BeforeUpdate Event to make sure that there is a valid value in
"DMR Number" if there is a value in "qty rejected".

Check Access VB Help on the BeforeUpdate Event of a Form.

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top