Dynamic Field Name in Query By Date

  • Thread starter Thread starter Sakuraki
  • Start date Start date
S

Sakuraki

Hi to all Masters,

I have Order Qty for past 30 days (04/01 to 04/30), I want the fiel
name display by date, is it possible?

Original field name

OrdQtyDay1, OrdQtyDay2, ....... OrdQtyDay30

Wanted field name

OrdQty04/01, OrdQty04/02, OrdQty04/03.......OrdQty04/30


is it possible
 
Any comments?

Yes; Duane and I both have replied with questions and concerns. Did
you not get the replies? (I'm not a user of ExcelTip.Com so I'm not
certain how replies end up getting back to you - hence I'm copying
this to EMail. Please reply to the newsgroup).

The two answers are copied below for your information.

===========
Is this a crosstab query? Do you really have fields with names like
this?

--
Duane Hookom
MS Access MVP
===========
With difficulty - but it would CERTAINLY be a VERY BAD IDEA.

Storing data in fieldnames is never good design. If you have a table
with the fields named above *it is incorrectly normalized*! Much
better would be a two-field table with the orderdate in a Date/Time
field and the Quantity in a numeric field, plus any other fields (such
as who is doing the ordering, or who the order is for).

You could then create a Crosstab query to get the dates across the top
and the quantities in (one or more) rows.
===========
 
Back
Top