Extracting information from table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi I am a fairly new user of access and I have the following question. I have
a table that has input from 2000 to 2007 and I want to break the table up by
year. I know how to run a query and Put Like */*/year. However I need to
actually pull this data out of the table and create a new table with just
that data for that year. How would I go about doing this?

Thanks!
 
You can add a new column in your query that pulls out the year from the
date, then put criteria of =2007.

Your new column/field in your query would look like this...

YearOnly: Year([YourDateFieldNameHere])

Now, as far as making a new table, you would have to turn this into a
make-table query but... I would not recommend that. Anything you can do
with a table can generally be accomplished with a query. Don't make a new
table, just create the query above to pull only this year's data and use
that query as the record source for your forms, reports, and other queries.
It is very very rare that you need to create a new table that includes a
subset of data from an existing table. You can usually accomplish this with
queries or filters.


Not that in the query above, you could even let the user decide (at run
time) which year's data is used. Instead of putting "=2007" under your new
year field, you would prompt the user with something like... =[Enter
four-digit year desired]

Hope all that helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top