Results 1 to 3 of 3
  1. #1
    mreniff is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    41

    Using Textbox value in loop

    I am trying how to use a value entered in an input box or a textbox on a form.



    The loop will continue to check the checkboxes on this form until it reach the value in the text box (or better yet I should use an input box).


    Click image for larger version. 

Name:	checkbox list.PNG 
Views:	13 
Size:	29.7 KB 
ID:	41310

    This is the sql statement I want to next inside a loop that will continue to check boxes on this form until the value in the textbox or input box is reached..

    UPDATE Students SET Students.[Update] = Yes
    WHERE (((Students.Update)=No) AND ((Students.FlightPath)=[forms]![SCHEDULER]![cboFlightPathList]) AND ((Students.Code)>=5));

    I am sorry but I do not have clue where to start.

    Please help

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you dont run sql in a loop,
    the sql DOES the 'loop' by changing all records in the table with the given criteria.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Is checkbox bound to field? Is form bound to Students table?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 9
    Last Post: 03-07-2017, 02:49 PM
  2. Replies: 12
    Last Post: 06-05-2015, 04:27 PM
  3. Replies: 13
    Last Post: 08-20-2014, 09:17 AM
  4. Replies: 17
    Last Post: 04-07-2014, 07:48 PM
  5. Replies: 3
    Last Post: 03-10-2013, 07:04 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