Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2006, 08:15 AM
Registered User
 
Join Date: Aug 2006
Location: Riyadh, Riyadh, Saudi Arabia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mackoy
Default Filter a subform based on value entered

Hi! Im just new here and can anybody would assist me with my problem regarding filtering subform based on "Between two fields value".

I have a main form consisting of the following fields.

Account No
From Period
To Period

The Subform Consists of the following fields

Account No
Period
Net Amount

My problem is how can i filter the subforms 'Period' field based only on the field value that i entered in the Forms 'From Period' And 'To Period'

Hope anyone would help on this.

Reply With Quote
  #2 (permalink)  
Old August 25th, 2006, 12:27 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Are you sure you don't want a report for this? A subform connotes data enrtry. If you want to display a certain period of time, you would do that in a report.

In any event, base the subform on a query, and put the following criteria in the period field:

BETWEEN [Forms]![frmYourMainFormName].[FromPeriod] AND [Forms]![frmYourMainFormName].[ToPeriod]

When the subform opens, it should contain only those values in the period.

Be sure to set the Parent Child link on the subform to the Account No.

Did that work?


mmcdonal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform Filter based on Multiselect Combo boxes natwong Access 2 November 16th, 2006 10:05 AM
Subform Filter using Multiple Combo boxes natwong BOOK: Expert One-on-One Access Application Development 0 November 13th, 2006 03:07 PM
Filter Based Upon Logged In User LandOfToz BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 August 31st, 2004 12:24 PM
Filter Subform B Based on Field in Subform A SerranoG Access VBA 3 June 18th, 2004 12:23 AM
Filter subform from main form DBoulos Access VBA 2 October 30th, 2003 12:20 PM



All times are GMT -4. The time now is 06:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.