Results 1 to 3 of 3
  1. #1
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239

    Question Forms - next record

    Hi, please I need help to figure out what is wrong with this my code I want the form (which consists of more than 20 option groups of buttons and check boxes) to clear ALL selections after the SAVE button is clicked. I have this code in the OnCurrent event of the form

    If Me.NewRecord Then
    Me.Frame1021 = Null
    Me.Frame1071 = Null
    Else


    Me.Frame1021 = Switch(Me.ASAgiven = "Yes", 1, Me.ASAgiven = "No", 2, Me.ASAgiven = "Undetermined", 3)
    Me.Frame1071 = Switch(Me.morphWhy, "Allergy", 1, Me.morphWhy = "Vital signs", 2)

    End If


    but I'm getting run time error '5': Invalid procedure call or argument on the line highlighted in red. Please help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Need = sign instead of the comma in front of "Allergy".
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Sheba is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    239
    yup, I fixed. Many thanks June7

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

Similar Threads

  1. One To Many Record Display while in a Forms Env.
    By CementCarver in forum Forms
    Replies: 2
    Last Post: 03-12-2013, 02:16 PM
  2. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  3. Record relationships in forms
    By avarusbrightfyre in forum Forms
    Replies: 2
    Last Post: 09-10-2009, 04:00 AM
  4. Forms' Record Source
    By Progress2007 in forum Programming
    Replies: 11
    Last Post: 07-27-2009, 11:04 AM
  5. Help record navigating in forms
    By edo in forum Forms
    Replies: 0
    Last Post: 08-12-2008, 10:45 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