Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Help....

Status
Not open for further replies.

bohammonds

IS-IT--Management
Jan 30, 2001
9
0
0
US
This is my problem... I am developing a application for my office. I need to be able to display calculated date information on a form and possibly a report.

Scenario: Legal cases are received into an department by a clerk and must be date received. The case is also given an action code which determines the number of days due out.

Example: Date_In: 03/08/2002
Action_Type: Case Review
Days_Out: 7

Action_Type and Days_Out fields are located in a database named "Action". Date_In is a field in the main database named "Cases".

On my form I can select the "Action_Type" from a combo box and update the linked field in the "Cases" database. However, I am not able to retrieve the assocated "Days_Out" value for calculation.

In the above example I would like to display the result: 03/15/2002
 
I think I understand your problem. This is actual a little bit tricky. What you need to do is to place both values into the lookup box. You can hide the field by making it's length 0". Then on the click event for the box you will have to update the table field with the hidden falue from the lookup box. There may well be a better way to handle this but I have used this method on occation and it works well enough.
 
The function you need to use is the date add function. For more detail look at the helpfile but for you would be in the below format.

DateAdd("d",Days_out,Date_in)

The "d" relates to the time scale of the Date you wish to add. In this case days.

Hope this helps

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top