472,378 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 software developers and data experts.

Crosstab and Form questions

I have a few questions for crosstab and popup form questions:

1. I created a crosstab as follows:

IT Financial Operation
John 21 22 22
Mary 15 17 16
Joe 28 29 31

For some other instances, the Operation column was not created because the
source table/query does not have an entry with value "Operation". However,
I need the column in a report that uses the crosstab query. How can I set
the Operation column in the report even when the source table doesn't have
"Operation" entry?
2. I used a text filed "Start Date" from a form as a query criteria. The
query is then used to create a crosstab query. Somehow, an error message
indicated that the text field cannot be recognized by the Jet Engine. I
then changed the query type to "Make Table". It worked. Is this the right
to do it?
3. A popup form is created to preview a report. How to bring the report
preview to the front after the "Print" button is clicked?
4. In the form mentioned at 3, I have the "Start Date" field. The start
date should be a Sunday date. I would like to have edit check to verify if
the entered date is a Sunday. I know I can use Format to convert the date
to weekday and check it. Where and how the edit routine should be written?

Sorry, it's been two years I left the Access programming. Any help is
appreciated.
Nov 13 '05 #1
2 2861
Ah, I remember having all these questions myself when I was first learning
about crosstab queries!

1. In the property sheet of the crosstab query, you can set ColumnHeaders
like this:
"IT";"Financial";"Operation"
Then all of these columns (and only these columns) will always appear, even
if they have no data.

2. For a crosstab query based on a parameter query, declare the parameters
explicitly in both queries:
Open the Parameters dialog from Query - Parameters.
In the left-hand column, enter the parameter as it appears in the
original query, e.g.
Forms!Form2![Start Date]
In the right-hand column, select the data type.
After you've done this, the crosstab query should run without any need
for the overhead of a make-table.

3. Here's one way:
In the report's Open event, set the form's Visible property to
False.
In the report's Close event, be sure to either close the form, or
set its Visible property back to True.

4. Where you do the checking is up to you, but I'd suggest in the
BeforeUpdate event of the textfield.
That way if the date is not a Sunday, you can set
Cancel=True
And focus will not leave the field until the criteria are met.
(Hint: You may want to include a special case to let you leave the
field if it is blank.)

HTH
- Turtle

"Sherman H." <sh***@charter.net> wrote in message
news:10*************@corp.supernews.com...
I have a few questions for crosstab and popup form questions:

1. I created a crosstab as follows:

IT Financial Operation
John 21 22 22
Mary 15 17 16
Joe 28 29 31

For some other instances, the Operation column was not created because the
source table/query does not have an entry with value "Operation". However, I need the column in a report that uses the crosstab query. How can I set
the Operation column in the report even when the source table doesn't have
"Operation" entry?
2. I used a text filed "Start Date" from a form as a query criteria. The
query is then used to create a crosstab query. Somehow, an error message
indicated that the text field cannot be recognized by the Jet Engine. I
then changed the query type to "Make Table". It worked. Is this the right to do it?
3. A popup form is created to preview a report. How to bring the report
preview to the front after the "Print" button is clicked?
4. In the form mentioned at 3, I have the "Start Date" field. The start
date should be a Sunday date. I would like to have edit check to verify if the entered date is a Sunday. I know I can use Format to convert the date
to weekday and check it. Where and how the edit routine should be written?
Sorry, it's been two years I left the Access programming. Any help is
appreciated.

Nov 13 '05 #2
"Sherman H." <sh***@charter.net> wrote in message news:<10*************@corp.supernews.com>...
I have a few questions for crosstab and popup form questions:

1. I created a crosstab as follows:

IT Financial Operation
John 21 22 22
Mary 15 17 16
Joe 28 29 31

For some other instances, the Operation column was not created because the
source table/query does not have an entry with value "Operation". However,
I need the column in a report that uses the crosstab query. How can I set
the Operation column in the report even when the source table doesn't have
"Operation" entry?
That is a problem when you use a crosstab with the TRANSFORM .. PIVOT
syntax in Access. The best solution would be to learn about crosstabs
the way they're used in SQL server etc, you can find an * excellent *
article about that here:

http://mysql.mirror.nedlinux.nl/tech...ticles/wizard/

(Make sure you use IIF instead of IF (mysql)). This might take a while
to get your head around but once you understand you will have grown...

I made a module in VB 6.0 once that could translate the TRANSFORM ..
PIVOT syntax into something any DB server could understand, if you
have VB you can find it here:

http://www.freevbcode.com/ShowCode.asp?ID=6076
That my two cents, can't help you with the other questions.

Good luck,

GJ

2. I used a text filed "Start Date" from a form as a query criteria. The
query is then used to create a crosstab query. Somehow, an error message
indicated that the text field cannot be recognized by the Jet Engine. I
then changed the query type to "Make Table". It worked. Is this the right
to do it?

3. A popup form is created to preview a report. How to bring the report
preview to the front after the "Print" button is clicked?
4. In the form mentioned at 3, I have the "Start Date" field. The start
date should be a Sunday date. I would like to have edit check to verify if
the entered date is a Sunday. I know I can use Format to convert the date
to weekday and check it. Where and how the edit routine should be written?

Sorry, it's been two years I left the Access programming. Any help is
appreciated.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darleen | last post by:
I am seeking conceptual here on how to get started with a "3D Matrix" in Access. We run a training center which holds multiple classes in multiple cities at multiple times. So I need to create a...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: Richard Hollenbeck | last post by:
Hello Newsgroup. You have all been very helpful in the past and I thank you. I try to ask relevant questions so that they don't just benefit me, but also benefit the group. I'm currently...
2
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic...
8
by: Penny | last post by:
(Access 2003 Multiuser Split DB, Windows XP Pro) Hi All, I would really appreciate just some basic tips on how to make a Crosstab Form based on a Crosstab Query. The query always has the same...
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
4
by: mattlightbourn | last post by:
Hi all, I have a problem which has been driving me nuts. Crosstab queries! I have a database witch a few different tables to do with garment manufacturing. I have a table for a client...
5
by: Albert Wammes | last post by:
Is it possible to create form containing an editable crosstab querie? The only way I can think of is to create a temporary table where the results of the crosstab querie are stored, then presented...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.