Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access form not showing all records in base table

Posted on 2004-08-19
7
Medium Priority
?
1,228 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
[X]
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
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Assisted Solution

by:Dexstar
Dexstar earned 1520 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 480 total points
ID: 11848856
The WHERE clause is Filtering out some of your records.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Assisted Solution

by:naivad
naivad earned 480 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 1520 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 1520 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 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