Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Keep The TechnoWorldInc.com Community Clean: Read Guidelines Here.
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Computer / Technical Issues » Hardware
 MS Access Database: Filter Data for a Report
Pages: [1]   Go Down
  Print  
Author Topic: MS Access Database: Filter Data for a Report  (Read 658 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email
MS Access Database: Filter Data for a Report
« Posted: October 15, 2007, 12:51:19 PM »


A common technique that I use to make a more professional looking user interface for filtering data for a report in an MS Access database, is to create a form to ask for criteria for the report. One example would be a report that is used to show data for a particular time period.


Step 1

Create a query to feed data to the report. Add any necessary parameters (like the "between [start_date] and [end_date]" style) and test.

Step 2

Create the report, using the query from step 1 as the record source. Test the report thoroughly. Obviously, you will have to answer the parameter questions manually, one at a time.

Step 3

Create a form with a text box for the starting date and another text box for the ending date. Use the button wizard to add a button that will preview the report created in step 2.

Step 4

Change the parameters in the query to this style:
Between [forms]![myform]![txtStartDate] and [forms]![myform]![txtEndDate]
making sure you use the actual names for the form "myform" and the text boxes "txtStartDate" and "txtEndDate".

That's it. And, no VBA coding was required.

(you may need to put some code behind the button that will verify the values in the various fields before starting the report, this would require VBA - you could also use a combo box to collect data for the report criteria)

Richard Killey is a Computer Database Programmer specializing in MS Access database development. Visit http://www.accessdatabasetips.com to read other articles of interest, and to download sample MS Access databases.

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.089 seconds with 24 queries.