Results 1 to 2 of 2

Thread: Access- -Prevent New Record

  1. #1

    Thread Starter
    Member dmerchen's Avatar
    Join Date
    Mar 2001
    Location
    Moving Back to Texas
    Posts
    60

    Access- -Prevent New Record

    I have on my form a button which now copies information and will copy it to a new record when pressed. I would like this to happen unless the date is not filled out. If the date is not filled out, I would like a msgbox to appear letting the user know that it is not complete, and a new record would not be created. The problem I am running into is my statement I believe. I keep getting an invalid use of null error statement. I am testing the date field and if it is empty I want the message to appear. Is this a possibility? Thanks for any help.
    DMerchen

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    Something like this :

    Textbox1.SetFocus
    x = Textbox1.Text
    If x = "" Then
    MsgBox ("Please enter a date.")
    End
    End If
    Regards
    BrianB
    -------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width