Results 1 to 4 of 4
  1. #1
    lizu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    3

    same form for new and update record

    hello ,
    I have the same form for new and update record BUT I want to set a different view.
    for the new record all fields are open.
    for the update form some of the fields will be enabled.
    I wrote an event for Private Sub Form_Current ()
    if (Me.id_reject="") // new record


    ...
    else // existing record
    ...
    end if
    but the debuger always go to the else part . my condition for new record does not work.
    how can I fix the problem ?
    Thanks in advance
    Liz

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about using: If Me.NewRecord Then

  3. #3
    lizu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    3
    Thanks a lot, it solved my problem

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Are you ready to use the Thread Tools at the top of the thread and mark this thread as Solved?

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

Similar Threads

  1. Update form record source & accde file
    By snoopy2003 in forum Programming
    Replies: 10
    Last Post: 05-14-2011, 01:10 PM
  2. Single Record Update Query from a Form
    By Steven.Allman in forum Access
    Replies: 0
    Last Post: 03-30-2011, 09:34 AM
  3. trying to update a record
    By mrsgwen in forum Access
    Replies: 1
    Last Post: 02-02-2011, 10:35 AM
  4. Update new record when leaving form
    By jpkeller55 in forum Access
    Replies: 6
    Last Post: 09-08-2010, 06:35 AM
  5. Run Update Query on Current Record in Form
    By c3pse in forum Queries
    Replies: 3
    Last Post: 08-14-2010, 05:40 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