Stupid Query Question...Column Display

G

Guest

How can you 'Not' have the column headings show in a query that contains no
returned data?

It's a simple query that contains the [Employee Name], [Clock Number], and
about 15 other columns of named job's. (Maybe I need to create a table for
jobs?)

If employee has done Job 'X' then just show that column and not the other 14
blank ones.

Thanks!
 
V

Vincent Johns

It looks as if, after the first 2 fields, the next 15 are all pretty
much of the same type. I don't know where you're getting those data --
I hope they aren't stored as a collection of same-type fields in a
Table. (If so, you'll go to a lot of extra work maintaining that Table
-- easier would be putting them into a separate Table in which each
record contains the name of one of the jobs, the job data that you
already have, and a link to the employee, such as via [Clock Number].)

You might want to define a Crosstab Query to display the information
you're talking about. Employees would be listed in the row headings,
and jobs would be listed in the column headings. In that kind of Query,
you can specify which columns get displayed, and thus can hide the ones
you don't want to see.

You might want to create a Table for jobs. If so, I suggest including a
name for the job and a unique identifier (perhaps Autonumber data type),
plus possibly other information that is characterized by a job, rather
than by a person. Skill code needed to do that job is one type of datum
that comes to mind.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
G

Guest

Hello,
Thank You for your help!

I tried some of the suggestions that you offered, but didn't get to far with
it.

I created new tables, for employee's and job's w/autonumber as the primary
key.

I was however getting the results that I need, but I'm still getting all of
the empty "table column headings" with blank cells? If I use 'Is Not null"
for more than one field, it then comes up with a blank table, if I just use
it once, it works for the one column but shows many blank columns where the
result is null.

I'll have more tomorrow.

Thank you,




Vincent Johns said:
It looks as if, after the first 2 fields, the next 15 are all pretty
much of the same type. I don't know where you're getting those data --
I hope they aren't stored as a collection of same-type fields in a
Table. (If so, you'll go to a lot of extra work maintaining that Table
-- easier would be putting them into a separate Table in which each
record contains the name of one of the jobs, the job data that you
already have, and a link to the employee, such as via [Clock Number].)

You might want to define a Crosstab Query to display the information
you're talking about. Employees would be listed in the row headings,
and jobs would be listed in the column headings. In that kind of Query,
you can specify which columns get displayed, and thus can hide the ones
you don't want to see.

You might want to create a Table for jobs. If so, I suggest including a
name for the job and a unique identifier (perhaps Autonumber data type),
plus possibly other information that is characterized by a job, rather
than by a person. Skill code needed to do that job is one type of datum
that comes to mind.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.

How can you 'Not' have the column headings show in a query that contains no
returned data?

It's a simple query that contains the [Employee Name], [Clock Number], and
about 15 other columns of named job's. (Maybe I need to create a table for
jobs?)

If employee has done Job 'X' then just show that column and not the other 14
blank ones.

Thanks!
 
V

Vincent Johns

I could give a better answer if you can post examples of a couple of
records from each of the Tables used in your Queries, plus the SQL of
any Queries you have defined, plus an illustration (you'll have to do
this by hand) of what you'd like your Query to generate from your
example records.

In your Query, I expect that you specified conditions in which you
wanted [Field3] to be not null AND for [Field7] to be not null, etc.
Depending on your data, that might very well produce an empty recordset.
But specifying that kind of condition (called a "filter") will affect
only which records you see, and not which fields are displayed for each
record.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
Hello,
Thank You for your help!

I tried some of the suggestions that you offered, but didn't get to far with
it.

I created new tables, for employee's and job's w/autonumber as the primary
key.

I was however getting the results that I need, but I'm still getting all of
the empty "table column headings" with blank cells? If I use 'Is Not null"
for more than one field, it then comes up with a blank table, if I just use
it once, it works for the one column but shows many blank columns where the
result is null.

I'll have more tomorrow.

Thank you,




:

It looks as if, after the first 2 fields, the next 15 are all pretty
much of the same type. I don't know where you're getting those data --
I hope they aren't stored as a collection of same-type fields in a
Table. (If so, you'll go to a lot of extra work maintaining that Table
-- easier would be putting them into a separate Table in which each
record contains the name of one of the jobs, the job data that you
already have, and a link to the employee, such as via [Clock Number].)

You might want to define a Crosstab Query to display the information
you're talking about. Employees would be listed in the row headings,
and jobs would be listed in the column headings. In that kind of Query,
you can specify which columns get displayed, and thus can hide the ones
you don't want to see.

You might want to create a Table for jobs. If so, I suggest including a
name for the job and a unique identifier (perhaps Autonumber data type),
plus possibly other information that is characterized by a job, rather
than by a person. Skill code needed to do that job is one type of datum
that comes to mind.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.


netadmin wrote:

How can you 'Not' have the column headings show in a query that contains no
returned data?

It's a simple query that contains the [Employee Name], [Clock Number], and
about 15 other columns of named job's. (Maybe I need to create a table for
jobs?)

If employee has done Job 'X' then just show that column and not the other 14
blank ones.

Thanks!
 
G

Guest

I took one of your suggestions and created a separate table for each job and
was able to get the results needed. The formatting of the imported
information looked like the strcture of a crosstab query, but I'm not
familiar enough to create one at this time.
The information that I have, I can work with and build from there. So I
think I'm good until next time.

Thank You for your Help!

Vincent Johns said:
I could give a better answer if you can post examples of a couple of
records from each of the Tables used in your Queries, plus the SQL of
any Queries you have defined, plus an illustration (you'll have to do
this by hand) of what you'd like your Query to generate from your
example records.

In your Query, I expect that you specified conditions in which you
wanted [Field3] to be not null AND for [Field7] to be not null, etc.
Depending on your data, that might very well produce an empty recordset.
But specifying that kind of condition (called a "filter") will affect
only which records you see, and not which fields are displayed for each
record.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
Hello,
Thank You for your help!

I tried some of the suggestions that you offered, but didn't get to far with
it.

I created new tables, for employee's and job's w/autonumber as the primary
key.

I was however getting the results that I need, but I'm still getting all of
the empty "table column headings" with blank cells? If I use 'Is Not null"
for more than one field, it then comes up with a blank table, if I just use
it once, it works for the one column but shows many blank columns where the
result is null.

I'll have more tomorrow.

Thank you,




:

It looks as if, after the first 2 fields, the next 15 are all pretty
much of the same type. I don't know where you're getting those data --
I hope they aren't stored as a collection of same-type fields in a
Table. (If so, you'll go to a lot of extra work maintaining that Table
-- easier would be putting them into a separate Table in which each
record contains the name of one of the jobs, the job data that you
already have, and a link to the employee, such as via [Clock Number].)

You might want to define a Crosstab Query to display the information
you're talking about. Employees would be listed in the row headings,
and jobs would be listed in the column headings. In that kind of Query,
you can specify which columns get displayed, and thus can hide the ones
you don't want to see.

You might want to create a Table for jobs. If so, I suggest including a
name for the job and a unique identifier (perhaps Autonumber data type),
plus possibly other information that is characterized by a job, rather
than by a person. Skill code needed to do that job is one type of datum
that comes to mind.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.


netadmin wrote:


How can you 'Not' have the column headings show in a query that contains no
returned data?

It's a simple query that contains the [Employee Name], [Clock Number], and
about 15 other columns of named job's. (Maybe I need to create a table for
jobs?)

If employee has done Job 'X' then just show that column and not the other 14
blank ones.

Thanks!
 
G

Guest

Looking at this reply a bit closer, I see that you mention a filter to not
see the empty column listing. I will have to look at how to make a filter,
this I've not done before. I will experiment with this.

Thank You,

Vincent Johns said:
I could give a better answer if you can post examples of a couple of
records from each of the Tables used in your Queries, plus the SQL of
any Queries you have defined, plus an illustration (you'll have to do
this by hand) of what you'd like your Query to generate from your
example records.

In your Query, I expect that you specified conditions in which you
wanted [Field3] to be not null AND for [Field7] to be not null, etc.
Depending on your data, that might very well produce an empty recordset.
But specifying that kind of condition (called a "filter") will affect
only which records you see, and not which fields are displayed for each
record.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
Hello,
Thank You for your help!

I tried some of the suggestions that you offered, but didn't get to far with
it.

I created new tables, for employee's and job's w/autonumber as the primary
key.

I was however getting the results that I need, but I'm still getting all of
the empty "table column headings" with blank cells? If I use 'Is Not null"
for more than one field, it then comes up with a blank table, if I just use
it once, it works for the one column but shows many blank columns where the
result is null.

I'll have more tomorrow.

Thank you,




:

It looks as if, after the first 2 fields, the next 15 are all pretty
much of the same type. I don't know where you're getting those data --
I hope they aren't stored as a collection of same-type fields in a
Table. (If so, you'll go to a lot of extra work maintaining that Table
-- easier would be putting them into a separate Table in which each
record contains the name of one of the jobs, the job data that you
already have, and a link to the employee, such as via [Clock Number].)

You might want to define a Crosstab Query to display the information
you're talking about. Employees would be listed in the row headings,
and jobs would be listed in the column headings. In that kind of Query,
you can specify which columns get displayed, and thus can hide the ones
you don't want to see.

You might want to create a Table for jobs. If so, I suggest including a
name for the job and a unique identifier (perhaps Autonumber data type),
plus possibly other information that is characterized by a job, rather
than by a person. Skill code needed to do that job is one type of datum
that comes to mind.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.


netadmin wrote:


How can you 'Not' have the column headings show in a query that contains no
returned data?

It's a simple query that contains the [Employee Name], [Clock Number], and
about 15 other columns of named job's. (Maybe I need to create a table for
jobs?)

If employee has done Job 'X' then just show that column and not the other 14
blank ones.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top