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 VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 October 14th, 2003, 05:13 PM
Authorized User
 
Join Date: Oct 2003
Location: Toronto, Ontario, Canada.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filter subform from main form

I have a read only subform on a main form. The subform has a few hundred records with a particular field called txtInvoiceDate which holds a date,(medium date format).
The records on the subform, are over the course of a whole year.
With 12 command buttons on the main form (one for each month), i would like to filter the subform into one particular month for that year, using one of the command buttons on the main form that corresponds with that particular month.
Any help would be appreciated, Thank you!
Reply With Quote
  #2 (permalink)  
Old October 15th, 2003, 09:08 AM
Authorized User
 
Join Date: Jun 2003
Location: Memphis, TN, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Create an SQL statement for whatever is selected, set the recordsource for the sub form to be that SQL statement, then requery the subform. (or refresh)

John
Reply With Quote
  #3 (permalink)  
Old October 30th, 2003, 12:20 PM
Authorized User
 
Join Date: Oct 2003
Location: Toronto, Ontario, Canada.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

John thank-you very much for your response, it's worked very well.
I simply made a command button that when clicked, put my SQL statement
on the recordsource property of the subform. For my intent and purpose, works like a charm.
Thanks again!

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
Synchronizing main form w/subform (i.e. backward) paladin Access VBA 7 April 19th, 2007 06:40 AM
Moving total from Subform to Main Form Shepwad Access 1 March 10th, 2006 10:57 AM
updating main form from subform dartcoach Access 6 April 28th, 2005 08:27 AM
how to parse filter from a form to a main form flyfish Access 1 February 1st, 2005 05:36 AM
Filter Subform B Based on Field in Subform A SerranoG Access VBA 3 June 18th, 2004 12:23 AM



All times are GMT -4. The time now is 02:15 PM.


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