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
Related Q & A:
- How to query calendar with events from a specific date?Best solution by stackoverflow.com
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- How to access the value of a field of the current node in Drupal?Best solution by drupal.org
- How to connect php file to ms access?Best solution by Stack Overflow
- What do we study while doing an MS in the US? which is the easiest field there?Best solution by internationalstudent.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.