473,770 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to create a selective(filte red) lookup report (thingy?)

19 New Member
Ok I'm once again showing my complete (or almost) ineptitude with all things Access.

I'm using Access 2007 and need to do the following:

SETUP:

I have a table of membership information, and a table of dues information. They are linked via a unique ID number so that I can see the data for each entry without opening the corresponding table.

PROBLEM:

I need to create a form (or whatever I need to accomplish my goal) that basically allows me to select the filter parameters by clicking.

Like so maybe:

A form that uses a check box for each month. By selecting the months you want to see and then hitting a "Generate" button. It then generates a report of dues paid in those months, and displays them alongside a number and a name from the other table.

I have no idea how to link each check box to a field in a table and then getting all those selected to be joined in a report.

I'm not even sure it can be done.

Can anyone guide a hapless, gormless, ignorant rookie trying????

Please, with sugar on top?
Jul 14 '07 #1
13 3904
NeoPa
32,573 Recognized Expert Moderator MVP
Let's start with the concepts first then. We can sugar coat if you stick with it.
  1. You need a report to display the information. Don't worry at this stage about the filtering. Design a report that can show the whole dataset.
  2. You need a form to select your criteria from. On the form you need to put whatever controls are required to allow the operator to choose the criteria for selecting only the item(s) they want.
  3. When they have selected the selections, a Command Button control should be clicked to trigger your code to run the report.
  4. Your code needs to set up a filter string, the complexity of which is determined by your form.
  5. Lastly, your code needs to invoke the report, but should include passing the filter string in the invocation.
The effect of this will be that the report (which can show your whole dataset) will just show the filtered data - as you want it to.
Jul 15 '07 #2
Daedalus
19 New Member
Damn I was hoping to avoid using codes and I can't write that stuff.

Ok I now have a form that contains twelve check boxes and two command buttons. One button to open the report for the whole year and one that will operate the filter command.

I also have the report created to show the whole year.
Jul 15 '07 #3
NeoPa
32,573 Recognized Expert Moderator MVP
You'd be surprised what you can manage with a little help ;)

First of all, we need to know what your CheckBoxes are supposed to do. You can start with just a couple of them to give a general idea.

Now look in Example Filtering on a Form to see the concepts explained and even reproduce the example to get a good feel of this subject. When you've done that, come back and we can take you through it as it relates to your situation (if you even need any more help at that stage).
Jul 16 '07 #4
Daedalus
19 New Member
I haven't worked with VB code in over 10 years and that was an amateur effort. So help will definently be needed on that.

The checkboxes are all labeled "January, Febuary..." and so forth - one for each month

I also have one command button labeled "Show_Dues_Repor t" to open the report (Called "Dues_Report") showing the whole year.

Lastly I have one more command button labelled "Create_Report" intended to be used for the filtering code to only display those months that have been checked off in the Check Boxes.
Jul 16 '07 #5
NeoPa
32,573 Recognized Expert Moderator MVP
First of all you don't need to have two separate buttons to open the report.
One button can have code that checks the CheckBoxes and only adds the filter if any are checked (True).

Now, as in my earlier post (#4), I need you to look at the tutorial. This may sound harsh, but I don't want to work with you if you haven't tried it out, as that will be more work for me. If you find that you can't get it to work, let me know. I can work with that. What I can't (read am not prepared to) do is work with people who expect me to do all the donkey work for them. Not that I'm trying to suggest this is you. I'm simply redirecting you to that important bit of the previous post ;)
Jul 17 '07 #6
Daedalus
19 New Member
No problem with that, just wanted to stress the point that I am much more familair with Access thatn I am with writing anyything in code.

And that tutorial will be getting some me-time with me shortly.

Nice to know I only need the one button to operate the whole thing.

BUT since the form is set up so that all the code is in one command button, will there be diffucties in tying in the checkboxes to the code, or can it be made to see if functions outside it own object are triggered?
Jul 17 '07 #7
NeoPa
32,573 Recognized Expert Moderator MVP
...
BUT since the form is set up so that all the code is in one command button, will there be difficulties in tieing in the checkboxes to the code, or can it be made to see if functions outside its own object are triggered?
No. The code behind the button can refer quite easily to all the controls on the form. Checkboxes are particularly easy as you just say :
Expand|Select|Wrap|Line Numbers
  1. If [CheckBoxName] Then ...
to see if it's checked.
Jul 17 '07 #8
Daedalus
19 New Member
Ok I've been over the tutorial a few times, I think that I'll have to do it again and again cause that was hard reading for me right now.

But I figure that the structure of the code should be along these lines:

IF [Checkbox:Januar y] Then print Table[Dues/Column January] to Report[Dues_Overview]
(obviously not correct formatted code, have no clue yet as to what that should be)
Repeated for other months

And I think I don't need anything special to print the whole thing as I think the structure of the VB code can be set up so that the filter is only activated when one or more checkboxes are used.

If not then I might simply need to start the code with another set of IF [Chechbox] commands to launch the filter code...

Am I on the right track with this...?
Jul 23 '07 #9
NeoPa
32,573 Recognized Expert Moderator MVP
Ok I've been over the tutorial a few times, I think that I'll have to do it again and again cause that was hard reading for me right now.

But I figure that the structure of the code should be along these lines:

IF [Checkbox:Januar y] Then print Table[Dues/Column January] to Report[Dues_Overview]
(obviously not correct formatted code, have no clue yet as to what that should be)
Repeated for other months

And I think I don't need anything special to print the whole thing as I think the structure of the VB code can be set up so that the filter is only activated when one or more checkboxes are used.

If not then I might simply need to start the code with another set of IF [Chechbox] commands to launch the filter code...

Am I on the right track with this...?
Well, yes and no really.
Yes you do need to check the [CheckBox]es in your code.
No you would not do it in the way you're talking about.

Here's a very simple (as simple as I can make it but my explanations are sometimes considered obscure) explanation of the concepts.
  • When running a report, there is an option to Filter the results. IE. A report designed to show everything can be used, without changing the design of it in any way, to show selected items. This is done simply and easily by passing a Filter string when opening it.
  • What you need to do (and we can certainly help you here) is to create a string of SQL Filter words from the information contained on the form. The SQL string will contain the whole of the selection requirement before being passed to the DoCmd.OpenRepor t function.
  • You can build up the string, one item at a time, in your VBA code connected to the CommandButton that is clicked to run the report.
  • The resultant string is simply a list of checks which can be joined logically with AND and/or OR keywords. These checks are to be applied to each record as it is processed to determine whether it should be included in the results (report).
Jul 23 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

8
7589
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I want them to do as little as possible when they run their reports. I have a crosstab query that displays usage of items for each month. It looks pretty much like this: ITEM DESC UM 12/02 1/03 2/03 3/03 ...ETC. 1 Solution ...
1
1546
by: bmoos1 | last post by:
I have two reports: 2004 New Enrollments and 2004 Cancellations. 1. Each report shows by month: "Monthly", "BiMonthly"(*2), "Weekly" (*52/12), "Total Monthly" (++) and "Projected Annual"(*12). 2. At the end of the report is the "Grand Total Projected Annual"(=sum()
1
1588
by: cdolphin88 | last post by:
Hello, I'm new in creating report in Ms-Access and I have some questions. I want to display a text Hong Kong Dollars when a field in my database is = "HKD" and display a text Patacas when this field is = "MOP". Is there possible?
8
2009
by: sesmap | last post by:
I have a table which is a list of clients that we are sending to another company to contact for updating their account. I have a second table that is the other company's report back to me telling which of those clients they reached, what the outcome of that contact is, whether additional product was sold, etc. I would like to create a report which merges the records so I can see how many leads I outsources, how many contacts and sales were...
2
1929
by: devindersingh1984 | last post by:
hello sir i am making a project in ms access it is having two tables that is interrelated with primary key. i want to get report of current record means report should take data from both tables. and it should print one record
1
2726
by: tbehmand | last post by:
Hi I am getting the following message when I click on 'Create report in Design view', does anyone know how to fix this. "There was a problem retrieving printer information for this object. The object may have been sent to a printer that is unavailable." Also when I perform the steps using the create report wizard I get "The wizard is unable to create your report." I would appreciate any assistance you can give me in this regard. ...
1
1181
by: alem | last post by:
Hi all help me how to create Report in SQL Server or SQL Query Analyzer. thank you in advance
6
1695
by: alem | last post by:
Hallo pls help me how to create Report in Visual Basic.
1
2163
by: SantyBhi | last post by:
Plz , any one can explain how to create report in c#asp.net without using Crystal Report.
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.