If Me.txtCounter > 100 Then
MsgBox "My Message"
DoCmd.Close acForm, Me.Name, acSaveNo
End If
Change txtCounter to the actual name of your textbox or replace
Me.txtCounter with the actual name of a variable if it is a variable in the
code and not a control on the form.
--
Wayne Morgan
MS Access MVP
"N J" <bl*************@blueyonder.co.uk> wrote in message
news:19*****************@fe2.news.blueyonder.co.uk ...
Hi,
I can't figure out how to put this into code, any help would be
great..thanks. Basically, if counter is over 100 then show msgbox then
close.
If txt.Counter > 100 Then msgbox "my message" docmd.close
--
Kind Regards,
Customer Services
P.S. For us to answer your emails efficiently, please always include the
original message. Thank you.