[mso] Re: Access 2002: Checking For Nulls On Form Close

  • From: Cathy.Evans@xxxxxxxxx
  • To: mso@xxxxxxxxxxxxx
  • Date: Thu, 10 Jun 2004 11:25:51 -0400

Jim, what am I doing wrong?  I pasted below in my form and changed the
field names to appropriate fields, then opened the form, left fields blank
to test, exited form, and got a 'Compile error: Method or data member not
found' error.  It highlighted 'txtRequiredPROJECT'(replaced my field name).
I haven't used anything like this before, so please bear with me, thanks,
Cathy


>>Private Sub Form_BeforeUpdate(Cancel As Integer)
    If Len(Me.txtRequiredFieldOne & "") = 0 Then
        MsgBox "Please fill in Field One", vbOKOnly + vbExclamation,
"Can't Do That!"
        Me.txtRequiredFieldOne
        Cancel = True
        Me.Undo
        Exit Sub
    End If
    If Len(Me.txtRequiredFieldTwo & "") = 0 Then
        MsgBox "Please fill in Field Two", vbOKOnly + vbExclamation,
"Can't Do That!"
        Me.txtRequiredFieldTwo
        Cancel = True
        Me.Undo
        Exit Sub
    End If
    If Len(Me.txtRequiredFieldThree & "") = 0 Then
        MsgBox "Please fill in Field Three", vbOKOnly + vbExclamation,
"Can't Do That!"
        Me.txtRequiredFieldThree
        Cancel = True
        Me.Undo
    End If
End<<




-----------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. If you are not the intended recipient 
of this message you are hereby notified that any use, review,
retransmission, dissemination, distribution, reproduction or any
action taken in reliance upon this message is prohibited. If you 
received this in error, please contact the sender and delete the 
material from any computer.  Any views expressed in this message
are those of the individual sender and may not necessarily reflect 
the views of the company.  
-------------------------------------------------------------------------------------------------------

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: