Results 1 to 4 of 4
  1. #1
    DubCap01 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2014
    Location
    Dubbo, Australia
    Posts
    104

    Frm field ControlSource based on values of two Tbl fields


    Hi all,

    I am trying to create a lookup of sorts to populate a form field. Not sure of the syntax, hence the question...

    TblBookings (we'll use the three fields for simplicity sake)
    BookingID
    CheckedIn (True/False)
    CheckedOut (True/False)

    The ControlSource for the Form field should be the count of records in TblBookings where CheckedIn = True and CheckedOut = False

    I can get the answer in a query, but not sure how to write the syntax for the form field ControlSource

    thanks in anticipation!

    Pete

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You should be able to use DCount() with the same criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DubCap01 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2014
    Location
    Dubbo, Australia
    Posts
    104
    Yep, that worked Paul, thank you!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 12-09-2014, 02:01 AM
  2. Replies: 1
    Last Post: 02-19-2014, 11:07 AM
  3. Replies: 3
    Last Post: 07-10-2012, 05:50 PM
  4. Replies: 8
    Last Post: 06-02-2012, 11:26 AM
  5. Replies: 2
    Last Post: 10-27-2011, 10:28 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