Results 1 to 2 of 2
  1. #1
    prabha_friend is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2014
    Location
    Chennai
    Posts
    5

    Question Converting this formula to an access database

    =IF(OR(WEEKDAY(CX1480,2)=6,WEEKDAY(CX1480,2)=7,COU NTIF('C:\Documents and Settings\karuppsp\Desktop\My Projects\SLA - C11\[Holiday Calendar FR Freight.xlsx]Holiday Calendar FR Freight'!$D$5:$D$14,CX1480)>0),TRUE,FALSE)




    I have created the Holiday Calendar in a table named Holidays. I know I have to use a subquery here but I haven't used it before. Please help. I have created the following column in a query with the following expression:

    Ap Inquiry: IIf(Weekday([Received Date],2)=6 Or Weekday([Received Date],2)=7 Or (Subquery Here),True,False)

    Thanks in advance...

  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,530
    As answered elsewhere, a DCount(), and regarding a subquery:

    I'm not sure a subquery would be faster than a domain function, and not sure how you'd incorporate it there. Personally I'd probably create a function that took the date as an input parameter and returned the Boolean. Written correctly it would only look for holidays when the date failed the first 2 tests.
    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: 7
    Last Post: 05-13-2013, 11:37 AM
  2. Replies: 1
    Last Post: 02-28-2013, 02:41 PM
  3. Replies: 1
    Last Post: 05-15-2012, 04:55 PM
  4. Converting Access Database
    By comteck in forum Access
    Replies: 5
    Last Post: 12-28-2011, 05:32 PM
  5. Converting Access database form onto a web page
    By nosirrah69 in forum Database Design
    Replies: 2
    Last Post: 03-07-2006, 05:06 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