English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm trying to create an array from a query in MS Access 2003. The array will be used to display statistical data for 12 months (periods) and will consist of 4 main elements: PeriodID, PeriodEnd_date, Total_qty and Total_Value.

The query will summarise the required data, based on user input (starting Period), but this does not always produce 12 rows of data as some periods have no records. What I want to do is perform a data check as it creates the array, and populate the QTY and value fields with zeros where there is a period within the specified range with no records. The desired end result is an array that will contain exactly 12 records. I know it must be possible, but for the life of me I can't figure it out.

Is there anyone out there who can provide maybe an example in VBA that could work for me?

Thanks.

2007-01-10 21:05:16 · 1 answers · asked by AndyTechGuy 4 in Computers & Internet Programming & Design

1 answers

TOTAL CONTROL WITH VBA
Controlling execution sequence

* Creating decision-making logic
* Building iteration statements
* Queries and the Immediate If (IIf)
* Populating fixed and dynamic arrays

2007-01-10 21:10:18 · answer #1 · answered by valuedprofile 3 · 0 0

fedest.com, questions and answers