Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Table Development question

Experts, I am developing a table but need a little help.  

I have :
ID
[Description]
[Type]
[WithinDays]
[Type]

I have many reporting requirements and they are either Quarterly, Semiannually, Annually and within a certain number of days past those points.  For example, an annual report would be within 120 days after years end and a quarterly is within 60 days past the quarter.  

My question is, do I hard code [withindays] (ie 120, 60) as a field in a table?  Or is it better some other way (maybe within a query)

thank you
ASKER CERTIFIED SOLUTION
Avatar of Priya Sudharsan
Priya Sudharsan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pdvsa

ASKER

thank you.  I plan to use those functions so I think a split is acceptable. Let me know if there is an objection.  

thanks again.
Avatar of pdvsa

ASKER

Gustav:  could you give me a quick example of how I would use those functions?  Meaning I would first identify the end of quarter with the first function and then use DateADD to add X days?  I guess I would call the function in the query design window.  thank you for your help.  I am glad you responded.  I remember you are excellent with dates and technical questions.  I am a little rusty as have not worked in Access in some time.
You could ask:

"When is the next reports ultimo this quarter?"

    datNextThisQuarter = DateThisQuarterLast(Date)

"What is the deadline of this? If within 30 days:

    intMaxDelay = 30
    datNextThisQuarterLatest = DateAdd("d", intMaxDelay, DateThisQuarterLast(Date))

But there are, of course, many variations over this.

/gustav
Avatar of pdvsa

ASKER

very nice.  thank you.  I will be playing around with this.  thanks again for the codes.