PC Review


Reply
Thread Tools Rate Thread

Automating a History Table

 
 
=?Utf-8?B?U2hhcm9uSW5HZW9yZ2lh?=
Guest
Posts: n/a
 
      24th Mar 2006
How do programically append each months records to a history table? Right
now, I use a command button that appends each month's records to the History
table. I need assistance, however, in including the month's date for each
group of records.

 
Reply With Quote
 
 
 
 
TC
Guest
Posts: n/a
 
      24th Mar 2006
You do not "append records to a history table". You store a date in
each record, so that all of your forms & reports can filter for records
for the last week, or the last month, or between Jan 13 and Mar 25 of
1998, or whatever they want.

HTH,
TC (MVP Access)
http://tc2.atspace.com

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Mar 2006
Do you really need to append the records to a history table? Why not put the
year and month as fields in the existing table, and change your queries to
only work with the current month.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"SharonInGeorgia" <(E-Mail Removed)> wrote in
message news:32A20CB9-6DD2-4767-8491-(E-Mail Removed)...
> How do programically append each months records to a history table?
> Right
> now, I use a command button that appends each month's records to the
> History
> table. I need assistance, however, in including the month's date for
> each
> group of records.
>



 
Reply With Quote
 
=?Utf-8?B?U2hhcm9uSW5HZW9yZ2lh?=
Guest
Posts: n/a
 
      24th Mar 2006
Douglas,
Yes, I need a history table because in addition to pulling a Month to Date
report, I also pull a Year To Date report that includes wieghted
calculations. It's important that the history table does not have duplicate
information so I set the primary keys on Date and Store Number.


"Douglas J. Steele" wrote:

> Do you really need to append the records to a history table? Why not put the
> year and month as fields in the existing table, and change your queries to
> only work with the current month.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "SharonInGeorgia" <(E-Mail Removed)> wrote in
> message news:32A20CB9-6DD2-4767-8491-(E-Mail Removed)...
> > How do programically append each months records to a history table?
> > Right
> > now, I use a command button that appends each month's records to the
> > History
> > table. I need assistance, however, in including the month's date for
> > each
> > group of records.
> >

>
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Mar 2006
That doesn't explain why you need the data in a second table.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"SharonInGeorgia" <(E-Mail Removed)> wrote in
message news:29B3B472-A84F-477C-A93B-(E-Mail Removed)...
> Douglas,
> Yes, I need a history table because in addition to pulling a Month to Date
> report, I also pull a Year To Date report that includes wieghted
> calculations. It's important that the history table does not have
> duplicate
> information so I set the primary keys on Date and Store Number.
>
>
> "Douglas J. Steele" wrote:
>
>> Do you really need to append the records to a history table? Why not put
>> the
>> year and month as fields in the existing table, and change your queries
>> to
>> only work with the current month.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "SharonInGeorgia" <(E-Mail Removed)> wrote in
>> message news:32A20CB9-6DD2-4767-8491-(E-Mail Removed)...
>> > How do programically append each months records to a history table?
>> > Right
>> > now, I use a command button that appends each month's records to the
>> > History
>> > table. I need assistance, however, in including the month's date for
>> > each
>> > group of records.
>> >

>>
>>
>>



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      25th Mar 2006
Sharon, did you see my reply? Some of them are not getting through.

You do not "append records to a history table". You store a date in
each record, so that all of your forms & reports can filter for records
for the last week, or the last month, or for the records between Jan 13
and Mar 25 of 1998, or for whatever other period that you might want.

HTH,
TC (MVP Access)
http://tc2.atspace.com

 
Reply With Quote
 
=?Utf-8?B?U2hhcm9uSW5HZW9yZ2lh?=
Guest
Posts: n/a
 
      26th Mar 2006
My original data comes in as follows.

Import Format (50,000 records):
AcctType Jan Feb Mar Apr May ....
Store#1 101 500.00 250.00 300.00
202 400.00 100.00 45.00
500 150.00 10.00 100.00
Store #2.....

Each month, I take the data for that month and create a crosstab table using
the Acct Types as the columns. So the original data no longer exist as it
is imported. Each report is specific only to that month.

REPORT FORMAT (230 records)
Store # Acct 101 Acct 202 Acct500
Store#1 500 400 150
Store#2....
Store #3.....

"Douglas J. Steele" wrote:

> That doesn't explain why you need the data in a second table.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "SharonInGeorgia" <(E-Mail Removed)> wrote in
> message news:29B3B472-A84F-477C-A93B-(E-Mail Removed)...
> > Douglas,
> > Yes, I need a history table because in addition to pulling a Month to Date
> > report, I also pull a Year To Date report that includes wieghted
> > calculations. It's important that the history table does not have
> > duplicate
> > information so I set the primary keys on Date and Store Number.
> >
> >
> > "Douglas J. Steele" wrote:
> >
> >> Do you really need to append the records to a history table? Why not put
> >> the
> >> year and month as fields in the existing table, and change your queries
> >> to
> >> only work with the current month.
> >>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no private e-mails, please)
> >>
> >>
> >> "SharonInGeorgia" <(E-Mail Removed)> wrote in
> >> message news:32A20CB9-6DD2-4767-8491-(E-Mail Removed)...
> >> > How do programically append each months records to a history table?
> >> > Right
> >> > now, I use a command button that appends each month's records to the
> >> > History
> >> > table. I need assistance, however, in including the month's date for
> >> > each
> >> > group of records.
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      27th Mar 2006
So your problem is that you've got a non-normalized database design.

You really should normalize the data you're storing. Once you've done that,
it's fairly straight-forward to produce a report for only the current month,
even though you've got multiple months data in your table.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"SharonInGeorgia" <(E-Mail Removed)> wrote in
message news:B16AEC96-7BAE-48F2-B875-(E-Mail Removed)...
> My original data comes in as follows.
>
> Import Format (50,000 records):
> AcctType Jan Feb Mar Apr May ....
> Store#1 101 500.00 250.00 300.00
> 202 400.00 100.00 45.00
> 500 150.00 10.00 100.00
> Store #2.....
>
> Each month, I take the data for that month and create a crosstab table
> using
> the Acct Types as the columns. So the original data no longer exist as
> it
> is imported. Each report is specific only to that month.
>
> REPORT FORMAT (230 records)
> Store # Acct 101 Acct 202 Acct500
> Store#1 500 400 150
> Store#2....
> Store #3.....
>
> "Douglas J. Steele" wrote:
>
>> That doesn't explain why you need the data in a second table.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "SharonInGeorgia" <(E-Mail Removed)> wrote in
>> message news:29B3B472-A84F-477C-A93B-(E-Mail Removed)...
>> > Douglas,
>> > Yes, I need a history table because in addition to pulling a Month to
>> > Date
>> > report, I also pull a Year To Date report that includes wieghted
>> > calculations. It's important that the history table does not have
>> > duplicate
>> > information so I set the primary keys on Date and Store Number.
>> >
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> Do you really need to append the records to a history table? Why not
>> >> put
>> >> the
>> >> year and month as fields in the existing table, and change your
>> >> queries
>> >> to
>> >> only work with the current month.
>> >>
>> >> --
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no private e-mails, please)
>> >>
>> >>
>> >> "SharonInGeorgia" <(E-Mail Removed)> wrote in
>> >> message news:32A20CB9-6DD2-4767-8491-(E-Mail Removed)...
>> >> > How do programically append each months records to a history table?
>> >> > Right
>> >> > now, I use a command button that appends each month's records to the
>> >> > History
>> >> > table. I need assistance, however, in including the month's date
>> >> > for
>> >> > each
>> >> > group of records.
>> >> >
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Automating Table Save dymondjack Microsoft Access VBA Modules 0 9th Mar 2009 12:50 PM
Need help automating a pivot table... doj Microsoft Excel Programming 0 13th Jan 2008 09:00 PM
Automating a table update? curtis.schmitt@gmail.com Microsoft Access Macros 3 21st Jan 2007 08:11 AM
Automating linking, table name, and mdb name changes Pete Straman Straman via AccessMonster.com Microsoft Access Form Coding 0 12th Feb 2005 10:42 PM
automating a pivot table bobf Microsoft Excel Misc 1 21st Jan 2005 09:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 PM.