Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access form not showing all records in base table

Posted on 2004-08-19
7
1,221 Views
Last Modified: 2012-05-05
Loaded 229 records without any errors. All show up in table. However when open form only 143 records show up. Form is based on a query which select * from the table.
0
Comment
Question by:HKBoyz
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Assisted Solution

by:Dexstar
Dexstar earned 380 total points
ID: 11848785
HKBoyz:

SELECT * doesn't mean "Select all records".  It means "select all fields".  Are you doing a join or anything with any other tables?  Post the full text of the query so we can have a look.

HTH,
Dex*
0
 

Author Comment

by:HKBoyz
ID: 11848795
The form is based on this query, where t_requirements is the table where data goes to:

SELECT t_requirements.*
FROM t_requirements
WHERE (((t_requirements.Process_ID)=IIf([forms]![f_requirements].[option].[value]=99,[process_id],([forms]![f_requirements].[option].[value]))) AND ((t_requirements.Module_ID)=IIf([forms]![f_requirements].[option1].[value]=99,[module_id],([forms]![f_requirements].[option1].[value]))) AND ((t_requirements.Finsys_id)=IIf([forms]![f_requirements].[option2].[value]=99,[finsys_id],([forms]![f_requirements].[option2].[value]))))
ORDER BY t_requirements.Process_ID;

The conditions are for option group filtering purpose, where 99 = ALL.
0
 
LVL 4

Assisted Solution

by:naivad
naivad earned 120 total points
ID: 11848856
The WHERE clause is Filtering out some of your records.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 4

Assisted Solution

by:naivad
naivad earned 120 total points
ID: 11848890
OK...

I actually built the thing...

Check your table for NULL values, they wont show...if the value is 0 it works, NULLS do not work
0
 
LVL 19

Assisted Solution

by:Dexstar
Dexstar earned 380 total points
ID: 11849003
naivad:
> Check your table for NULL values, they wont show...if the value is 0
> it works, NULLS do not work

Good catch!

HKBoyz:

Try this:

    SELECT t_requirements.*
    FROM t_requirements
    WHERE ((((t_requirements.Process_ID)=IIf([forms]![f_requirements].[option].[value]=99,[process_id],([forms]![f_requirements].[option].[value])))
    OR ([forms]![f_requirements].[option].[value]=99 AND IsNull([process_id]) = True))
    AND (((t_requirements.Module_ID)=IIf([forms]![f_requirements].[option1].[value]=99,[module_id],([forms]![f_requirements].[option1].[value])))
    OR ([forms]![f_requirements].[option1].[value]=99 AND IsNull([module_id]) = True))
    AND (((t_requirements.Finsys_id)=IIf([forms]![f_requirements].[option2].[value]=99,[finsys_id],([forms]![f_requirements].[option2].[value]))))
    OR ([forms]![f_requirements].[option2].[value]=99 AND IsNull([finsys_id]) = True))
    ORDER BY t_requirements.Process_ID;

I think I got it right.  I didn't recreate it, that's just off the top of my head.

-D*
0
 
LVL 19

Accepted Solution

by:
Dexstar earned 380 total points
ID: 11849011
HKBoyz:

Maybe that isn't right.  I think it might need to be this:

    SELECT t_requirements.*
    FROM t_requirements
    WHERE ((((t_requirements.Process_ID)=IIf([forms]![f_requirements].[option].[value]=99,[process_id],([forms]![f_requirements].[option].[value])))
    OR ([forms]![f_requirements].[option].[value]=99 AND [process_id] IS NULL))
    AND (((t_requirements.Module_ID)=IIf([forms]![f_requirements].[option1].[value]=99,[module_id],([forms]![f_requirements].[option1].[value])))
    OR ([forms]![f_requirements].[option1].[value]=99 AND [module_id] IS NULL))
    AND (((t_requirements.Finsys_id)=IIf([forms]![f_requirements].[option2].[value]=99,[finsys_id],([forms]![f_requirements].[option2].[value]))))
    OR ([forms]![f_requirements].[option2].[value]=99 AND [finsys_id] IS NULL))
    ORDER BY t_requirements.Process_ID;

-D*
0
 

Author Comment

by:HKBoyz
ID: 11854277
Thanks, guys. All those columns are required so they all got values (ie. no null vlaues). My quesiton is: does the number of records ACCESS is showing at the bottom of the screen correctly reflect the toal number of records in the table? I thought I saw all the records ont he form, but the number is showing sth. different.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question