Query missing data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that works great, it counts the items that are needed for my
report. The problem that I am having is when I open my query to check my
totals they are not there, each field is empty. I filter my form from the
query so all the data that is in my form should be in the query. I need help
at this point, I have no clue of what I did wrong. Can someone please help me
 
Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking pieces
out/simplifying until it does what it should, then building back up one step
at a time, confirming at each step.
 
I apologize for leaving out vital info....my form is design to record all the
accidents that happens in our county. I have 3 fields that is missing data in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I need and
it works perfectly but in the query I am getting all 1. Here is my qry sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA
 
Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
I apologize for leaving out vital info....my form is design to record all the
accidents that happens in our county. I have 3 fields that is missing data in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I need and
it works perfectly but in the query I am getting all 1. Here is my qry sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


Jeff Boyce said:
Without some idea of:
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking pieces
out/simplifying until it does what it should, then building back up one step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

need
help help
me
 
what do you mean
--
LHEMA


Jeff Boyce said:
Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
I apologize for leaving out vital info....my form is design to record all the
accidents that happens in our county. I have 3 fields that is missing data in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I need and
it works perfectly but in the query I am getting all 1. Here is my qry sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


Jeff Boyce said:
Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking pieces
out/simplifying until it does what it should, then building back up one step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

I have a form that works great, it counts the items that are needed for my
report. The problem that I am having is when I open my query to check my
totals they are not there, each field is empty. I filter my form from the
query so all the data that is in my form should be in the query. I need
help
at this point, I have no clue of what I did wrong. Can someone please help
me
 
Please see my earlier response.

If the query as is isn't working, take something out. Does it still (not)
work?

Take something more out. Does it work?

Keep going backwards until it works.

The other approach is to start over, with the minimum query. Then keep
adding back in pieces until it breaks. That helps you identify where/what
isn't working.

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
what do you mean
--
LHEMA


Jeff Boyce said:
Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
I apologize for leaving out vital info....my form is design to record
all
the
accidents that happens in our county. I have 3 fields that is missing
data
in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I
need
and
it works perfectly but in the query I am getting all 1. Here is my
qry
sql:
SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee
Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee
Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


:

Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking pieces
out/simplifying until it does what it should, then building back up
one
step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

I have a form that works great, it counts the items that are
needed
for my
report. The problem that I am having is when I open my query to
check
my
totals they are not there, each field is empty. I filter my form
from
the
query so all the data that is in my form should be in the query. I need
help
at this point, I have no clue of what I did wrong. Can someone
please
help
 
I tried working backwards and all it does is effect my form and my report, I
have over 100 records and I do not wan to lose the information. I'll figure
something out. Thanks Jeff
--
LHEMA


Jeff Boyce said:
Please see my earlier response.

If the query as is isn't working, take something out. Does it still (not)
work?

Take something more out. Does it work?

Keep going backwards until it works.

The other approach is to start over, with the minimum query. Then keep
adding back in pieces until it breaks. That helps you identify where/what
isn't working.

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
what do you mean
--
LHEMA


Jeff Boyce said:
Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

I apologize for leaving out vital info....my form is design to record all
the
accidents that happens in our county. I have 3 fields that is missing data
in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I need
and
it works perfectly but in the query I am getting all 1. Here is my qry
sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal
Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by
Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee
Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl
Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


:

Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking pieces
out/simplifying until it does what it should, then building back up one
step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

I have a form that works great, it counts the items that are needed
for my
report. The problem that I am having is when I open my query to check
my
totals they are not there, each field is empty. I filter my form from
the
query so all the data that is in my form should be in the query. I
need
help
at this point, I have no clue of what I did wrong. Can someone please
help
me
 
Taking a query apart (or building one up) does not affect your underlying
records.

You have data (in tables), a query that returns records according to
selection criteria, and a form (and reports?) that use the query to display
selected records.

If your query isn't working correctly, you'll need to figure out why.

Have you tried creating a totally new query, to see if it does the same
thing that your old one does?

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
I tried working backwards and all it does is effect my form and my report, I
have over 100 records and I do not wan to lose the information. I'll figure
something out. Thanks Jeff
--
LHEMA


Jeff Boyce said:
Please see my earlier response.

If the query as is isn't working, take something out. Does it still (not)
work?

Take something more out. Does it work?

Keep going backwards until it works.

The other approach is to start over, with the minimum query. Then keep
adding back in pieces until it breaks. That helps you identify where/what
isn't working.

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
what do you mean
--
LHEMA


:

Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

I apologize for leaving out vital info....my form is design to
record
all
the
accidents that happens in our county. I have 3 fields that is
missing
data
in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results
I
need
and
it works perfectly but in the query I am getting all 1. Here is
my
qry
sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal
Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by
Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee
Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl
Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


:

Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep
taking
pieces
out/simplifying until it does what it should, then building back
up
one
step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

I have a form that works great, it counts the items that are needed
for my
report. The problem that I am having is when I open my query
to
check
my
totals they are not there, each field is empty. I filter my
form
from
the
query so all the data that is in my form should be in the query. I
need
help
at this point, I have no clue of what I did wrong. Can someone please
help
me
 
I am creating a new query now, I will let you know if it does the same.
Thanks, I'll keep you posted
--
LHEMA


Jeff Boyce said:
Taking a query apart (or building one up) does not affect your underlying
records.

You have data (in tables), a query that returns records according to
selection criteria, and a form (and reports?) that use the query to display
selected records.

If your query isn't working correctly, you'll need to figure out why.

Have you tried creating a totally new query, to see if it does the same
thing that your old one does?

--
Regards

Jeff Boyce
<Office/Access MVP>

LHEMA said:
I tried working backwards and all it does is effect my form and my report, I
have over 100 records and I do not wan to lose the information. I'll figure
something out. Thanks Jeff
--
LHEMA


Jeff Boyce said:
Please see my earlier response.

If the query as is isn't working, take something out. Does it still (not)
work?

Take something more out. Does it work?

Keep going backwards until it works.

The other approach is to start over, with the minimum query. Then keep
adding back in pieces until it breaks. That helps you identify where/what
isn't working.

--
Regards

Jeff Boyce
<Office/Access MVP>

what do you mean
--
LHEMA


:

Have you tried working backwards on the query?

--
Regards

Jeff Boyce
<Office/Access MVP>

I apologize for leaving out vital info....my form is design to record
all
the
accidents that happens in our county. I have 3 fields that is missing
data
in
the query only. Injuires by department, injuries by employee and total
injuries. In the form I use the count function to get the results I
need
and
it works perfectly but in the query I am getting all 1. Here is my
qry
sql:

SELECT [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of
Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee
Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee
Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl
Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency
Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl
Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported],
Count([tbl
Employee Accidents].[Total Injuries by Department]) AS [CountOfTotal
Injuries
by Department], Count([tbl Employee Accidents].[Total Injuries by
Employee])
AS [CountOfTotal Injuries by Employee], Count([tbl Employee
Accidents].[Total
Injuries:]) AS [CountOfTotal Injuries:], [tbl Employee
Accidents].[EmployeeID#]
FROM [tbl Employee Accidents]
GROUP BY [tbl Employee Accidents].[EmployeeID#], [tbl Employee
Accidents].Name, [tbl Employee Accidents].Address, [tbl Employee
Accidents].City, [tbl Employee Accidents].ZipCode, [tbl Employee
Accidents].DOB, [tbl Employee Accidents].[Department:], [tbl Employee
Accidents].[Job Title:], [tbl Employee Accidents].[Location of
Accident],
[tbl Employee Accidents].[Date of Injury:], [tbl Employee
Accidents].[Time
of
Injury:], [tbl Employee Accidents].[Date Employer Notified:], [tbl
Employee
Accidents].[Type of Injury:], [tbl Employee Accidents].[Part of Body
Affected:], [tbl Employee Accidents].Summary, [tbl Employee
Accidents].[No
Treatment], [tbl Employee Accidents].[Minor: By Employee], [tbl
Employee
Accidents].[Minor: Clinic/ER], [tbl Employee Accidents].[Emergency
Care],
[tbl Employee Accidents].[Hospitalized 24hrs], [tbl Employee
Accidents].[Hospital/Physician], [tbl Employee
Accidents].[Hospital/Physician
Address], [tbl Employee Accidents].[Report Prepared By:], [tbl
Employee
Accidents].Telephone, [tbl Employee Accidents].[Date Reported], [tbl
Employee
Accidents].[EmployeeID#];


I hope I gave enough information, thanks
LHEMA


:

Without some idea of:
your data structure;
your form design
your query SQL
your filter
it will be tough to offer anything specific.

A general approach would be to start at the query and keep taking
pieces
out/simplifying until it does what it should, then building back up
one
step
at a time, confirming at each step.

--
Regards

Jeff Boyce
<Office/Access MVP>

I have a form that works great, it counts the items that are
needed
for my
report. The problem that I am having is when I open my query to
check
my
totals they are not there, each field is empty. I filter my form
from
the
query so all the data that is in my form should be in the query. I
need
help
at this point, I have no clue of what I did wrong. Can someone
please
help
me
 
Back
Top