Results 1 to 3 of 3
  1. #1
    Wombat is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    33

    Complicated textbox expression challenge

    I have a table called Employee, another called EmployeeLOA (leave of absence) and a third called EmployeeTermination. I want to create a textbox on a form bound to Employee that displays LOA, Terminated or Active.



    Active is assumed if the employee is not Terminated or on LOA.

    If there are any Termination dates, the employee can be marked as Terminated

    BUT for the leave of absence, Every time the employee takes an LOA, an LOADate and ReturnDate are recorded. I need to find the most recent LOADate for this employee and check to see if the current date is between that and the Return date.


    So far, I can't even get it to tell me LOA or not.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You need to develop a query that joins the tables and has criteria and/or expressions in calculated fields to manipulate the data. Really don't know your data well enough to be specific. Then the form RecordSource might include the query or the textbox could do a DLookup on the query. Again, don't know enough to be specific.
    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
    Wombat is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    33
    I think you may have just helped. I tend to get too focused on trying to write one statement that gets me down to one answer and then I don't even know how to get that answer into a textbox. I think writing a query with some calculated fields and then Dlookup off of that could be the ticket.

    Thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 02-24-2012, 06:20 PM
  2. Database challenge: can you find the answer?
    By Cholomanchuten in forum Access
    Replies: 5
    Last Post: 08-05-2011, 12:27 PM
  3. Anyone fancy a challenge????!!!!!!
    By gregh in forum Database Design
    Replies: 1
    Last Post: 03-14-2011, 05:36 PM
  4. Textbox Control Source As An Expression help!
    By emilyrogers in forum Forms
    Replies: 11
    Last Post: 02-11-2011, 07:31 AM
  5. Replies: 13
    Last Post: 02-08-2011, 11: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