CCan debug button be disabled on popup form?

  • Thread starter Thread starter eb1mom
  • Start date Start date
E

eb1mom

I have error message box that pops up if number entered on
a form is zero or less. I have the message "please enter a
number over zero" displayed in the box. But,the debug
button is enabled can it be disabled?
 
What generates the "error message box"? Was it created by you or is an error
message from VBA?
 
It is a VBA message box. The only field required in this
forms'table is a recordtype number but, I needed another
field on this form to have a number entered. So I wrote, on
before update of form, If(number I need on this form) = 0
then recordtype field = "". Which causes the VBA message
box to appear because recordtype field is required in
table. It all started because I couldn't figure out how to
make a field required only on certain forms.
 
Thanks for the further information. To my knowledge, there is not a way to
disable the debug button that is displayed on a VBA error message box. From
the information provided, I would suspect that some re-design is necessary.

Any time a field is required is a table, you will receive this error message
so if there are some situations where you don't want it to be required, you
could think about making it not required in the table and enforcing its entry
on the forms where it is necessary. An example of this is to use the 'Before
Update' event to check to see if the value has been entered and providing a
custom MsgBox if it has not.

HTH.
 
Thank-you You are correct about the re-design being needed
,I just wasn't sure where to start. After reading your
reply I searched for custom message box information and
found a lot. I have now reworked form and it functions
correctly. Thanks for pointing me in the right direction.
 
Back
Top