Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access form not showing all records in base table

Posted on 2004-08-19
7
Medium Priority
?
1,231 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 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
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

971 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