Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003

    Unanswered: Query on a table bound form ?

    Here is what I'm trying to do and maybe I'm going about it all wrong .

    I have a form [Vacationapproval] bound to tb.vacation with fields [datehired][daysrequested] [daysallowed] [daysused] [anniversarydate] and [employeenum]

    [anniversarydate] is calculated by an update query that simply copies the [datehired] and changes the year to the current year .
    I need to show the user ( on this form) the amount of vacation days that are remaining available to that user . Days are based on [daysallowed]-[daysused] bewteen last anniversary date and Now () .

    Tricky part is there needs to be an if statement ,

    if last anniversary is before Date() then Sum of [daysallowed]-[daysused] bewteen last anniversary date and Now ()
    Else Sum of [daysallowed]-[daysused] bewteen anniversary date+ DateAdd "d", -365 and Now ()

    I want to run the query based on a field [employeenum] after update using the current record in the form and pass the contents of field [employeenum] to the query as a parameter , the returned number [daysavailable] would be in another text box on the same form

    So bottum line , is this even possible ? ? ?

  2. #2
    Join Date
    May 2003
    Provided Answers: 5
    send the db with sample data and a word doc describing the behavior you want and I will look

  3. #3
    Join Date
    May 2003

    thanks , already got it

    thanks , already got it solved .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts