report with queries problem

J

JeremyReger

I created a database to enter in personnel and their status such as who is on
vacation, who is working in another office, and who has appointments for the
day. I went through and created queries for each table such as appointments,
vacation, etc... When I go to add them to my report some go in as:

input.appointment.Name
input.appointment.Title
Date
Time

And the only ones that go on the report correctly are the ones that all come
onto the report as:

Name
Title
Date
Time

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...

Thank you for your help!!!
 
K

KARL DEWEY

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...
Post the query SQL for the above.
 
J

JeremyReger

I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));
 
J

JeremyReger

And I am trying to get a number of Different Queries on One Report

JeremyReger said:
I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




KARL DEWEY said:
not work, but I what the problem is...
Post the query SQL for the above.
 
K

KARL DEWEY

Try using ---
HAVING Int(Input_Appointment.Date)=Date();

--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




KARL DEWEY said:
not work, but I what the problem is...
Post the query SQL for the above.
 
J

JeremyReger

Success!

The Appointment one works to query what is up for that day, but what about
the Incoming Personnel Query where you want it between two dates?

Thank you again!

KARL DEWEY said:
Try using ---
HAVING Int(Input_Appointment.Date)=Date();

--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




KARL DEWEY said:
But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...
Post the query SQL for the above.
--
KARL DEWEY
Build a little - Test a little


:

I created a database to enter in personnel and their status such as who is on
vacation, who is working in another office, and who has appointments for the
day. I went through and created queries for each table such as appointments,
vacation, etc... When I go to add them to my report some go in as:

input.appointment.Name
input.appointment.Title
Date
Time

And the only ones that go on the report correctly are the ones that all come
onto the report as:

Name
Title
Date
Time

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...

Thank you for your help!!!
 
K

KARL DEWEY

WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));
Does your field Input_Gain.Title contain a date? It seems to me that it
would have text.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
Success!

The Appointment one works to query what is up for that day, but what about
the Incoming Personnel Query where you want it between two dates?

Thank you again!

KARL DEWEY said:
Try using ---
HAVING Int(Input_Appointment.Date)=Date();

--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




:

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...
Post the query SQL for the above.
--
KARL DEWEY
Build a little - Test a little


:

I created a database to enter in personnel and their status such as who is on
vacation, who is working in another office, and who has appointments for the
day. I went through and created queries for each table such as appointments,
vacation, etc... When I go to add them to my report some go in as:

input.appointment.Name
input.appointment.Title
Date
Time

And the only ones that go on the report correctly are the ones that all come
onto the report as:

Name
Title
Date
Time

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...

Thank you for your help!!!
 
J

JeremyReger

You are correct, for some reason this is how when I enter it in the criteria
it ends up in the title column but the query works fine... but it would be
the RNLTD Column that has the date Report No LAter Than...

KARL DEWEY said:
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));
Does your field Input_Gain.Title contain a date? It seems to me that it
would have text.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
Success!

The Appointment one works to query what is up for that day, but what about
the Incoming Personnel Query where you want it between two dates?

Thank you again!

KARL DEWEY said:
Try using ---
HAVING Int(Input_Appointment.Date)=Date();

--
KARL DEWEY
Build a little - Test a little


:

I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




:

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...
Post the query SQL for the above.
--
KARL DEWEY
Build a little - Test a little


:

I created a database to enter in personnel and their status such as who is on
vacation, who is working in another office, and who has appointments for the
day. I went through and created queries for each table such as appointments,
vacation, etc... When I go to add them to my report some go in as:

input.appointment.Name
input.appointment.Title
Date
Time

And the only ones that go on the report correctly are the ones that all come
onto the report as:

Name
Title
Date
Time

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...

Thank you for your help!!!
 
K

KARL DEWEY

but the query works fine...
That is hard to believe that you can compare the title to two dates!

So if it 'works fine' then what are you asking about your 'Incoming
Personnel Query'?

--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
You are correct, for some reason this is how when I enter it in the criteria
it ends up in the title column but the query works fine... but it would be
the RNLTD Column that has the date Report No LAter Than...

KARL DEWEY said:
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));
Does your field Input_Gain.Title contain a date? It seems to me that it
would have text.
--
KARL DEWEY
Build a little - Test a little


JeremyReger said:
Success!

The Appointment one works to query what is up for that day, but what about
the Incoming Personnel Query where you want it between two dates?

Thank you again!

:

Try using ---
HAVING Int(Input_Appointment.Date)=Date();

--
KARL DEWEY
Build a little - Test a little


:

I apologize... I had an idiot moment.... I will just use the "sub report"
feature... if I can ever get the sub report to show up... but FYI... Here was
my Query SQL:

For My Appointment Query

SELECT Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
FROM Input_Appointment
GROUP BY Input_Appointment.FirstName, Input_Appointment.LastName,
Input_Appointment.Rank, Input_Appointment.Appointment_Type,
Input_Appointment.Time, Input_Appointment.Date
HAVING (((Input_Appointment.Date)=Date()));


For my Incoming Personnel Query

SELECT Input_Gain.Title, Input_Gain.FirstName, Input_Gain.LastName,
Input_Gain.Type, Input_Gain.Location, Input_Gain.RNLTD
FROM Input_Gain
WHERE (((Input_Gain.Title) Between Int(Date()) And Int([RNLTD])));




:

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...
Post the query SQL for the above.
--
KARL DEWEY
Build a little - Test a little


:

I created a database to enter in personnel and their status such as who is on
vacation, who is working in another office, and who has appointments for the
day. I went through and created queries for each table such as appointments,
vacation, etc... When I go to add them to my report some go in as:

input.appointment.Name
input.appointment.Title
Date
Time

And the only ones that go on the report correctly are the ones that all come
onto the report as:

Name
Title
Date
Time

But any of the queries that come with the "input.appointment.whatever" do
not work, but I what the problem is...

Thank you for your help!!!
 
J

JeremyReger

All of the queries work, I am trying to put the queries on a report. and
when I go to add them onto the report it says:

" You may have chosen fields from a table and from a query based on that
table. If so try choosing fields from only the table or only the query."

But I am only selecting the info from the Queries... And to answer your main
question, this is why it is in the reports section and not the queries
section. I need to get the queries on the Report, since the queries work...
 
K

KARL DEWEY

Are you trying to use multiple queries in a single report? The only ways I
know how to do that is to combine them in a query or use subreports.
 

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