I have a table with numerous fields and I am wanting to create a query using 2 of the fields. They are - Date File Received, Date Case Closed. I am wanting to create a formula so that it shows the number of days between received and closed. Any ideas? I am trying to get myself up to scratch with access as its been a few years since I have used it.
Thanks Very Much!!!
This should do it:
Datediff("d", [Date File Received], [Date Case Closed])
If you want to avoid weekends, you'll need to write a function to do that. There are a fair amount of samples on the internet pertaining to those.
Thanks very much for your help, this works, and I can now use the same rule for a few more queries I was having trouble with.
The other query I am now struggling with is again using the same table but just one field this time which is called Success Fees Count. The formula I am trying to get is 'if success fee count is greater than 0, deliver a TRUE response)
Thanks again!!!
This is called a conditional if statement. It's unique to access, so you won't be able to pass it in a SQL statement to a different db (say, to SQL server, for example).
It's pretty simple to use - iif(test condition, value if test true, value if test false)
iif([Success Fees Count]>0,True,False) --- This will return -1,0
iif([Success Fees Count]>0,"True","False") --- This will return text True/False
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks