Besides being smart, what are some good reasons for entering the medical field?

MS Access: Entering parameters for a calculated date field in a query.?

  • HELP! I'm trying to do a 'prospective shipping list' for my company and I have a query. The query has a Due Date as a calculated field: DueDate: IIf([Courses].[Region] Is Null,DateAdd("d",-60,[Courses].[Start_Da… If Region is null, it means it is going international needs to be shipped later. So I am having a problem setting a parameter for this DueDate field. I have it set for 'Between [Enter first due date] and [Enter second due date]', but it pulls random things from the next year. I have also checked and I did format the DueDate to a short date, but still doesn't work. If anyone could help me out with this, I'd really appreciate it! Thank you!!!! :)

  • Answer:

    1) Dates are stored as date-time numbers, regardless of how you format them. Format only affects the display. 2) You can't SET a date to "between", it has to be set to a specific date. You can only SELECT between. Assuming Start_Date in the current record has a valid date, IIf([Courses].[Region] Is Null,DateAdd("d",-60,[Courses].[Start_Da… <some other date>) will set DueDate to 60 days before Start_Date if Region is null, otherwise it gets set to <some other date> (whatever you want in there). You're on the right track, I just can't comment on the rest of the line.

Justin C at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.