Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Access Query Help


  • Please log in to reply
1 reply to this topic

#1 b2dan

b2dan

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:08:17 AM

Posted 26 September 2007 - 09:44 AM

Hi, Just trying to make a database in Access that'll allow the user to run a query and find out all records that are 10 years or older i.e. a piece of equipment that was last serviced in May 1997 requires servicing and once that was done in november 2005 doesn't. Also, is it possible to write a line into another query that will bring up items that are nearing the replacement date? Sorry if this is simple, but i've lost track of access and forgotten it since I left college!

Dan

BC AdBot (Login to Remove)

 


#2 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,574 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:09:17 AM

Posted 26 September 2007 - 02:53 PM

In the query design view, select the fields you want to see.
Under the first four lines are rows for multiple selection criteria.
Just as a quick way to get you started,

under a date you can enter things such as ">=Now()-7" to get records for the last week.
"<=Now()-364.25*2" will return records roughly over 2 years old or if you're fancy, ask the user to enter the date using 'parameters' (I'd give it to you, but am running out of time :thumbsup:

Don't use quotes.
Date functions can be tricky, but if you double click the entries, Access helps with syntax.
You can combine (AND) one criterion with another by writing them one above another.
And if I recall, OR needs to go across, so may have to pull the field names twice.

See Help for 'parameters' and 'selection criteria' and examples Access offers.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users