Results 1 to 4 of 4
  1. #1
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52

    New record condition

    Hi,



    I have two tables, Personal Details and Address. I have one address into it currently, before a new address can be added the fields in the 1st address, Address End Date and Reason for leaving/Ending address must be added.

    Do you know how I do this?

    Cheers

    Ross

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    In the form,
    in the ON CURRENT event, do a check
    If end date and reason null, then
    set the form DATAENTRY = false...or ADD RECORDS = false

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Ross.

    Do you have some test data and a clear description of what you are trying to do?
    Have you tried creating a data model of your proposed database and testing that model with your test data?
    Have you identified some rules that your "business" must adhere to?

    I don't think you have described your issue well enough to create a database. Getting a clear description of your business issue/opportunity and doing some "pencil and paper" conceptualizing can be a big help in designing your database.

  4. #4
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52
    Quote Originally Posted by ranman256 View Post
    In the form,
    in the ON CURRENT event, do a check
    If end date and reason null, then
    set the form DATAENTRY = false...or ADD RECORDS = false

    Hi

    I'm struggling. Got as far as...


    Private Sub Form_Current()
    If IsNull(Me.Address_End_Date) And IsNull(Me.Reason_for_Leaving_Ending_Address) Then Me.NewRecord
    = False

    End If






    End Sub

    Ross

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Where Condition larger than 255
    By intrepid in forum Access
    Replies: 7
    Last Post: 02-28-2015, 02:44 PM
  2. Where Condition
    By NISMOJim in forum Programming
    Replies: 4
    Last Post: 04-09-2014, 11:10 PM
  3. Help with using the AND condition
    By ssturges in forum Access
    Replies: 1
    Last Post: 11-25-2012, 12:36 AM
  4. Replies: 1
    Last Post: 11-24-2010, 09:51 AM
  5. How to use IIF condition
    By nshaikh in forum Queries
    Replies: 4
    Last Post: 09-12-2008, 01:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums