473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 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 3006
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.. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.