Results 1 to 2 of 2
  1. #1
    psbailey42 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2013
    Location
    Surrey, UK
    Posts
    6

    How to loop

    Afternoon all!

    Below is a code i've created to disable a field after certain information is inputted, however the code only works once and will leave
    the field disabled even if I change it to the correct information, HOW DO I LOOP:

    Private Sub LEARNER_AIM_REF_MATHS_AfterUpdate()
    If Me.LEARNER_AIM_REF_MATHS = "NONE" Then
    Me.mawarding_body.Enabled = True
    Else
    Me.mawarding_body.Enabled = False


    End If

    End Sub

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Your code shouldn't need a loop. It works fine for me.
    It runs automatically every time the LEARNER_AIM_REF_MATHS field is updated.

    Can you explain a detailed scenario in which it is not working for you?

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

Similar Threads

  1. Replies: 3
    Last Post: 03-10-2013, 07:04 AM
  2. Help with a For Loop in VB
    By JFo in forum Programming
    Replies: 5
    Last Post: 09-29-2011, 02:45 AM
  3. Error: Loop without Do
    By eric.opperman1@gmail.com in forum Programming
    Replies: 4
    Last Post: 01-25-2011, 02:37 PM
  4. Do While loop
    By jgelpi16 in forum Programming
    Replies: 7
    Last Post: 07-23-2010, 08:21 AM
  5. VBA Loop
    By DreamOn in forum Programming
    Replies: 4
    Last Post: 06-25-2010, 03:35 AM

Tags for this Thread

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