This is the beginning of my Before Update event
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then
intReturn = MsgBox("Do you want to save the changes?", vbYesNoCancel)
Select Case Response
Case vbYes
' do nothing
Case vbNo
' Undo the changes...
I have three fields on my main form. When I Click on the X at any point I validate all of those fields, they are all required, and I don't want to put that validation at the database level, so I validate those fields in the beforeupdate event...but if any of those three fields on the main form...
I'm exiting my form by using the windows X, I've validated some data in my beforeupdate event and I've found that I don't have the data elements I need filled in on my main form. I need to set focus back to a field on my main form...how do I do this forms![from name]![form field].setfocus gives...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.