I have in the neighborhood of 750 channels ( 3-4 worksheets). And a ton
of records (1000's)
I decided to put it into this format.
ChannelID, ChannelName, Time, Value
The problem I have now is showing it to the user in the shape like
excel.
If the user wants 8 channels, I want to show Time,Ch1,Ch2,Ch3 ... Ch8,
for all records.
I haven't come up with a great idea yet. All idea's welcome.
IF there is a better structure for importing the data, I would like to
hear about that also.
Thanks in advance
Chuck Streb
hth
<chuck...@gm.com> wrote in message
news:1131388402.9...@f14g2000cwb.googlegroups.com...
But I would like to have it as a recordset.
tina's answer fits your earlier specifications exactly. What do you need
that a crosstab won't supply?
--
Duane Hookom
MS Access MVP
--
<chuck...@gm.com> wrote in message
news:1131396007.8...@g14g2000cwa.googlegroups.com...
Chuck Streb,
Just execute the Crosstab Query Object or SQL string from your VBA
code, and you'll have a recordset of it.
Look up TRANSFORM/PIVOT for the JET SQL syntax of a Crosstab query
if you're interesting in how to write it directly.
Sincerely,
Chris O.
PS While microsoft.public.access.queries was an appropriate
newsgroup for this question, I'm thinking that
microsoft.public.access.externaldata,
microsoft.public.access.tablesdbdesign, and
microsoft.public.access.importexportlin are all, perhaps, not the
best newsgroups to cross-post this into.
> What do you mean by "as a recordset"? You can create a recordset from a
> crosstab query.
>
> tina's answer fits your earlier specifications exactly. What do you need
> that a crosstab won't supply?
Maybe I'm missing something, but in your original posting, what kinds of
values did you want to display for [Ch1], [Ch2], &c.? If they're the
same as the [Value] field in your current recordset, and the combination
is unique (no 2 records for the same [ChannelID] with the same [Time],
or whatever your row identifier will be), then no problem. If you do
have more than one [Value] for a given channel, then you'll need to
decide what to display, such as a maximum, or average, &c., to include
in your Crosstab Query.
Incidentally, you can use the Crosstab Query Wizard to set up your
Crosstab Query initially, then modify it if necessary in Query Design
View if you want to add filter criteria or sorting keys that you didn't
specify while running the wizard.
-- Vincent Johns <vjo...@alumni.caltech.edu>
Please feel free to quote anything I say here.
Maybe I need a better structure?!
Yes it would be easier to search through, but I won't have the
flexibility to bring in any data regardless of it existed or not.
I was hoping someone has gone through this and has come up with a novel
idea.
I am not asking for much am I ... LOL
You can use a criterion in the crosstab query to control which channels
are shown, e.g.
WHERE ChannelID IN (5, 66, 101, 102)
or
WHERE (ChannelID >=5) AND (ChannelID <=10)
In SQL view this goes between the FROM clause and the GROUP BY clause;
in query design view you add a column for the field in question and
select WHERE in the "Total" cell.
Alternatively (or additionally) you can specify column headings for the
crosstab, in which case channels which you haven't listed in the column
headings (in SQL view, the PIVOT clause of the crosstab query) won't be
included in the query's results.
You may need to use VBA to build the appropriate SQL statement.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
Chuck Streb,
John Nurick, in an earlier post, pointed out the solution to your
need to limit the Channels.
Sincerely,
Chris O.