Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2006, 06:12 AM
Authorized User
 
Join Date: Mar 2006
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default Filter using a Pop-up Form and Comboboxes

Hello!

I have a table in a database shows all expenses for several properties for one year. Some of the fields include: property, expense category, month, year, details, etc.

What I am trying to create is the following:

When I click to open a report, I want a little pop-up form to appear first to ask me what details I want to view from that table. I want the pop-up to ask about the property that I want to see the details for, the expense category to select (i.e. water, gas, telephones, etc.), the month I want to view it for and the year. If I leave the selection blank, it means all. For example, maybe I only want Vehicle Expenses for Property No. 1. Maybe I want all expenses related to Property No. 2 only. Maybe I want all electricity expenses for February of 2006.

Now...I have been able to do this using textboxes as the selection fields...however, I want this to be done using Combo box. I have made a query based on the details selected in the pop-up form, and if I use textboxes, it works perfectly. If I use combobox, nothing appears.

Any advice? Thank you!
 
Old March 10th, 2006, 10:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hello,

Microsoft put together a reports sample database years ago that contains a sample of the functionality you're looking for. The KB article is at http://support.microsoft.com/kb/q208529/. This link also contains a link to the complete reports databse.

Bob

 
Old May 4th, 2006, 10:44 AM
Authorized User
 
Join Date: Mar 2006
Posts: 83
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Sorry for getting back so late! Thank you for the link! It proved helpful! Check out my new problem....just posted it.....hope you can help. Thank you!

 
Old August 7th, 2008, 07:39 AM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using Access 2003 and I followed this link and it didn't work. I got the message:
“Microsoft Office Access can’t find the macro ‘Private Sub Form_Open(Cancel As Integer)DoCmd.’

The macro (or its macro group) doesn’t exist, or the macro is new but hasn’t been saved. Not that when you enter the macrogroupname.macroname syntax is an argument, you must specify the name the macro’s macro group was last saved under.”

Could this be because I'm using Access 2003 or would it be that I'm doing something wrong. I'm not very experienced with Access so that is a possibility!





Similar Threads
Thread Thread Starter Forum Replies Last Post
filter a sub form ahying Access VBA 1 June 29th, 2006 04:27 AM
how to parse filter from a form to a main form flyfish Access 1 February 1st, 2005 05:36 AM
Multiple filter on a form chimp Access VBA 0 September 9th, 2004 02:59 AM





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