T
Tom
I have many data files containing data from our old system. I have 12 filenames
to deal with (1 file per table). I have 5 cycles (we sell utilities) each
containing multiple [meter] books, except for the last (5), which has only 1
book. Cycle 1 has 28 books, and the other 3 have varying numbers of books.
For the most part, the book numbers increment by 1 from the first book, o.e.,
101, 102, 103, etc. But there are a couple of exceptions. There are several
books which don't exist, so the numbers are skipped.
I've been working on a much smaller app from our old system to work out the
'kinks' in cycling thru multiple years and tables. I figure it'll be an easy
conversion to cycle thru my books and tables. (No separate years to deal with.)
But in the code I'm working with now, I only have 5 years to deal with, so I've
used 5 if statements.
So here's the thing. Faced with up to say, 30 books or so per cycle, and 5
cycles, I don't think that using if statements would be the way to go. I'm
thinking of using an array. But as of yet, I have not played with arrays in VB.
(In a previous life, as a COBOL programmer, I used to play with them. But that
was at least 8 years ago...). So I was hoping that perhaps someone might be
able to provide some guidance here. And if an array *is* the way to go, perhaps
a little help in setting my array up. An array for each cycle perhaps?
In COBOL I could set something up like:
"101201301401501"
"102202302402 "
"103203303403 "
"105204306404 "
"106205307405 "
where the 1st column of 3 would be cycle 1, the 2nd column of 3 would be cycle
2, and so on. I don't even know if I can do this in VB, much less how. My help
file doesn't seem to be much help in this regard.
Hmmm... While I've been reading thru the array related posts in this ng (back
to mid 2003), I got to thinking. Perhaps just a table of the meter book numbers
that exist might be the way to go. Open the table, read the book number, and do
my import. Hmmm...
Oh yeah, I almost forgot. I'm using Access 2000.
Thanks in advance, I look forward to your response.
Tom
to deal with (1 file per table). I have 5 cycles (we sell utilities) each
containing multiple [meter] books, except for the last (5), which has only 1
book. Cycle 1 has 28 books, and the other 3 have varying numbers of books.
For the most part, the book numbers increment by 1 from the first book, o.e.,
101, 102, 103, etc. But there are a couple of exceptions. There are several
books which don't exist, so the numbers are skipped.
I've been working on a much smaller app from our old system to work out the
'kinks' in cycling thru multiple years and tables. I figure it'll be an easy
conversion to cycle thru my books and tables. (No separate years to deal with.)
But in the code I'm working with now, I only have 5 years to deal with, so I've
used 5 if statements.
So here's the thing. Faced with up to say, 30 books or so per cycle, and 5
cycles, I don't think that using if statements would be the way to go. I'm
thinking of using an array. But as of yet, I have not played with arrays in VB.
(In a previous life, as a COBOL programmer, I used to play with them. But that
was at least 8 years ago...). So I was hoping that perhaps someone might be
able to provide some guidance here. And if an array *is* the way to go, perhaps
a little help in setting my array up. An array for each cycle perhaps?
In COBOL I could set something up like:
"101201301401501"
"102202302402 "
"103203303403 "
"105204306404 "
"106205307405 "
where the 1st column of 3 would be cycle 1, the 2nd column of 3 would be cycle
2, and so on. I don't even know if I can do this in VB, much less how. My help
file doesn't seem to be much help in this regard.
Hmmm... While I've been reading thru the array related posts in this ng (back
to mid 2003), I got to thinking. Perhaps just a table of the meter book numbers
that exist might be the way to go. Open the table, read the book number, and do
my import. Hmmm...
Oh yeah, I almost forgot. I'm using Access 2000.
Thanks in advance, I look forward to your response.
Tom