A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Running a query against it's own base table



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2005, 04:32 PM
Jay
external usenet poster
 
Posts: n/a
Default Running a query against it's own base table

I am developing an application which is sort an inventory system. What I need
to do is load last month or weeks data minus the new product additions. This,
I want to leave blank for obvious reasons, however, I do not wish to have to
re-enter all the same data again. The data structure and product remain the
same through-out the week, month or years with minor additions. Is it
possible to use a query to load last month or weeks data into the same table
leaving the Add/Count column blank and then, tag the update with the date in
the date column in which the update was done?

I know I've seen it some place before, is it possible. If so, how?

Thanks,
  #2  
Old September 21st, 2005, 12:33 AM
David S via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

It would help if you could post the fields in the table in question: it is
certainly possible, but how you go about it depends a lot on whether you have
the month or week in the table. Something like this:

INSERT INTO Inventory ( DateColumn, Product )
SELECT Now() AS UpdateDate, Inventory.Product
FROM Inventory
WHERE (((Inventory.DateColumn)=[Enter Start Date]) AND ((Inventory.
DateColumn)=[Enter End Date]))
GROUP BY Now(), Inventory.Product;

If you want to automate this some more, you need to figure out you are going
to determine last month or last week from the current date - still not too
bad. This also puts a Date & Time in the DateColumn, which you can change by
using the DateSerial and Now() functions together.


--
Message posted via http://www.accessmonster.com
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when running Query, but not Report Blaze Running & Setting Up Queries 29 September 9th, 2005 05:40 AM
Help again from Ken Snell (Query) Randy Running & Setting Up Queries 22 August 29th, 2005 08:15 PM
Unable to edit records in a form or query Merlin Using Forms 7 May 10th, 2005 02:00 PM
Union Query Not Returning A Value Jeff G Running & Setting Up Queries 2 October 19th, 2004 05:47 PM
Big number gives error! Sara Mellen Running & Setting Up Queries 8 October 11th, 2004 02:48 AM


All times are GMT +1. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.