F
Frederick Wilson
I have tried to find the answer via goggle, no luck.
Access XP
My data entry form has 3 bound controls, the form is based on a table with
three fields.
Form.Dataentry=YES
Allowedits=yes
allowadditions=yes
allowdeletes=yes
In the code I have
select case len(me.txtIdentify)
case 0
Msgbox ...
cancel = true
me.txtIdentify.setfocus
case <>6
MsgBox ... too short
cancel = true
me.txtIdentify.setfocus
case else
me.txtIdentify=ucase(me.txtIdentify)
End Select
I have a button cmdAddProd that I have tried
me.refresh
me.requery
when you click the button it fires the beforeupdate, the problem gets
noticed the appropriate message box displays but the code continues to
execute instead of stoping at cancel = true. The code continues back to the
onclick_cmdAddProd but errors out complaining about the process was canceld.
Ideally, I would like to ensure that the information in the form is correct
prior to it being added to the table. The the form will reset as a blank
form to add the next product.
I thought BeforeUpdate was the way to go.
Can you help
Access XP
My data entry form has 3 bound controls, the form is based on a table with
three fields.
Form.Dataentry=YES
Allowedits=yes
allowadditions=yes
allowdeletes=yes
In the code I have
select case len(me.txtIdentify)
case 0
Msgbox ...
cancel = true
me.txtIdentify.setfocus
case <>6
MsgBox ... too short
cancel = true
me.txtIdentify.setfocus
case else
me.txtIdentify=ucase(me.txtIdentify)
End Select
I have a button cmdAddProd that I have tried
me.refresh
me.requery
when you click the button it fires the beforeupdate, the problem gets
noticed the appropriate message box displays but the code continues to
execute instead of stoping at cancel = true. The code continues back to the
onclick_cmdAddProd but errors out complaining about the process was canceld.
Ideally, I would like to ensure that the information in the form is correct
prior to it being added to the table. The the form will reset as a blank
form to add the next product.
I thought BeforeUpdate was the way to go.
Can you help