Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

Query missing data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LHEMA - 08 Dec 2005 13:27 GMT
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
Signature

LHEMA

Jeff Boyce - 08 Dec 2005 13:39 GMT
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.

Signature

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
LHEMA - 08 Dec 2005 13:46 GMT
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;
[quoted text clipped - 14 lines]
> > at this point, I have no clue of what I did wrong. Can someone please help
> me
Jeff Boyce - 08 Dec 2005 14:54 GMT
Have you tried working backwards on the query?

Signature

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
[quoted text clipped - 61 lines]
> > > at this point, I have no clue of what I did wrong. Can someone please help
> > me
LHEMA - 08 Dec 2005 15:01 GMT
what do you mean
Signature

LHEMA

> Have you tried working backwards on the query?
>
[quoted text clipped - 83 lines]
> help
> > > me
Jeff Boyce - 09 Dec 2005 01:51 GMT
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.

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> what do you mean
>
[quoted text clipped - 85 lines]
> > help
> > > > me
LHEMA - 09 Dec 2005 12:41 GMT
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
Signature

LHEMA

> Please see my earlier response.
>
[quoted text clipped - 121 lines]
> > > help
> > > > > me
Jeff Boyce - 09 Dec 2005 12:57 GMT
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?

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> 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
[quoted text clipped - 89 lines]
> > Employee
> > > > > Accidents].Telephone, [tbl Employee Accidents].[Date Reported],
[tbl
> > > > Employee
> > > > > Accidents].[EmployeeID#];
[quoted text clipped - 32 lines]
> > > > help
> > > > > > me
LHEMA - 09 Dec 2005 13:15 GMT
I am creating a new query now, I will let you know if it does the same.
Thanks, I'll keep you posted
Signature

LHEMA

> Taking a query apart (or building one up) does not affect your underlying
> records.
[quoted text clipped - 157 lines]
> > > > > help
> > > > > > > me
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.