Results 1 to 3 of 3
  1. #1
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79

    validate dates with checkboxes

    Hi all, sorry for the trouble but i am trying to validate that



    if textbox date is greater than listbox selected date then tick the checkbox
    else if textbox date is smaller than listbox selected date then dont tick the checkbox.

    this code sort of works but only focus on the first selection, after that if another selection occurs in the listbox, the validation doesnt work. please guide me to the right direction.

    If listbox1.Column(8) > Me.txtDate Then
    Me.checkbox= -1

    Else
    If listbox1.Column(8) < Me.txtDate Then
    Me.checkbox= 0
    End If
    End If

    a loop might be needed am not sure, i tried it but it goes wrong.

    thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Already marked solved - is it?
    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
    princess12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    79
    yes i completed it ages ago, sorry

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

Similar Threads

  1. Validate with code Yes or No
    By GinaFlan in forum Forms
    Replies: 10
    Last Post: 10-06-2014, 08:10 PM
  2. Validate textboxes before more VBA
    By cjriebe in forum Programming
    Replies: 3
    Last Post: 06-25-2014, 09:07 AM
  3. Validate a field
    By tweety in forum Forms
    Replies: 19
    Last Post: 03-29-2013, 04:06 PM
  4. validate based on another value
    By subnet11 in forum Programming
    Replies: 3
    Last Post: 06-11-2012, 12:12 AM
  5. how to validate the first line of address
    By dunners92 in forum Access
    Replies: 1
    Last Post: 03-15-2010, 09:53 PM

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