Access Crosstab or Form based on 2 tables with dates

314 Views Asked by At

There are a few answers here already that have part answered my challenge in Access but not fully.

I have 2 tables that form the basis of my database: customers and items

I have a further 2 tables; one for order quantities against customers and items (orders_a), and one for forecast quantities against customers and items (forecast_a).

forecast_a and orders_a also have a date for each customer and item combination (basically there will be 12 dates only for the 12 months of the year - 01/01/12,01/02/12,01/03/12 etc.)

Because a user will want to manually forecast quantities for a full year for each customer and each item, if there were 2 customers and 2 items, the forecast_a table would contain 48 rows. 2 items x 2 customers = 4, 4 x 12 dates = 48. The same goes for the orders_a.

I know this is a slightly unusual set up but the user requires visibility of a full year.

My main challenge based on this is as follows:

A user will want to see a form with customers in the first column, items in the second and then (like a crosstab): Jan Forecast Qty, Jan Order Qty, Feb Forecast Qty, Feb Order Qty etc.

Therefore how would I create a crosstab to pull both these tables together, and how would I go about creating a form for data entry off the back of it?

I may well be constructing my database the wrong way but the fact that the user needs a 'grid' where every entry is manual means I can't just have a form that creates a record one at a time for orders or forecasts.

Thanks in advance! Nick

1

There are 1 best solutions below

1
On

The problem you have is that this is a task that is in essence a spreadsheet task. Accordingly it may be best handled in Excel. To achieve this create an Excel object, create a blank worksheet, populate it with the data, then have a button to suck it back into the database when the user has finished.