Manage the History Data

  • Thread starter Thread starter Niklas
  • Start date Start date
N

Niklas

Hi all,

Case:
There are two tables in dbs, one for basic data (tblBasic)
like Product name, Product description… and one for
special data (tblSpecial) like Product Costs, Product
location… The Special data changes every year, so there
are one field for several years - like Costs_2002,
Costs_2003, Costs_2004, Location_2002, Location_2003,
Location_2004 etc…

I have a form for data updating. Now I’d like to have
command buttons, like 2002, 2003, 2004 on the form so I
could scan/edit/add/delete the yarly special data on the
form by clicking the “yearbutton”.

Any code behind the button or other ideas to solve this?
 
Your tblSpecial is not designed correctly. Your Costs_xxxx and
Location_xxxx are repeating groups - they should be rows, not columns.
Think about what you'll have to do to this application to add another year -
you'll have to modify the table design and your code.

Consider designing tblSpecial like this:

ProductID, ProductYear, Costs, Location

The Primary Key is ProductID and ProductYear, and Product ID links you back
to tblBasic.

Now display this table in a subform in Continuous form or Datasheet view.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
 
Back
Top