Results 1 to 2 of 2
  1. #1
    shod90 is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Jan 2016
    Posts
    134

    Question deducting holiday from a query in a form

    Dear All,
    I have a query which have a total days of holidays and i need to show that in a form which tell the user you have how many days remaining out of 21 days.
    How could it be done ?
    I already gave initial value for holidays textbox as

    Dim holidayDefault As Integer
    holidaysDefault = 21
    Me.HolidayBox.Value = holidaysDefault

    how can i minus the number in that query


    Click image for larger version. 

Name:	count.jpg 
Views:	8 
Size:	18.4 KB 
ID:	23344

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Can use DLookup() expression in textbox:

    =DLookup("CountOfHoliday", "queryname", "EmpID=" & [EmpID])
    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. Create a holiday DB for 30 employees
    By djspod in forum Database Design
    Replies: 2
    Last Post: 09-22-2015, 03:51 PM
  2. Adding a Holiday Table
    By Holli in forum Programming
    Replies: 9
    Last Post: 06-03-2015, 02:49 PM
  3. Weekend/Holiday Exclusion:
    By DHook in forum Modules
    Replies: 5
    Last Post: 12-10-2014, 12:52 PM
  4. Payslip Holiday Pay design
    By crxftw in forum Access
    Replies: 5
    Last Post: 07-22-2011, 11:58 AM
  5. function for national holiday
    By barkarlo in forum Access
    Replies: 0
    Last Post: 12-18-2006, 03:39 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