473,785 Members | 2,412 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
13 3905
NeoPa
32,578 Recognized Expert Moderator MVP
Please be sure to read these recent posts in order. It would have been a bit of a chunk to read and get to grips with all at once.

A problem many people struggle with when applying filter strings is "How to apply the AND and OR keywords?"
Seems obvious, but if I said we wanted to see records that were from January AND February, but no other months, would you use AND or OR in the Filter string?
If you said AND then you'd be wrong.
The Filter is checking each record as it is processed. Can any record be from both January AND February? No, it can't (You'd have no results at all). For each record, you want to determine if it is either January OR February (even though you want to include records from January AND February in your results set).
Jul 23 '07 #11
NeoPa
32,578 Recognized Expert Moderator MVP
Please be sure to read these recent posts in order. It would have been a bit of a chunk to read and get to grips with all at once.

Now I need to make some assumptions as you haven't shared any information about what you have in your database. I will assume a simple table :
Table Name=tblDue
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. CustomerID; Autonumber; PK
  3. PayDate; Date/Time
  4. Amount; Number (Currency)
The [tblDue] table (in this assumed (and simple) scenario) is the RecordSource for the [rptDues] report. The form ([frmDues]) has twelve CheckBoxes named [chkJan] through [chkDec] and a CommandButton [cmdReport].
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdReport_Click()
  2.   Dim strFilter As String
  3.  
  4.   strFilter = ""
  5.   If Me.chkJan Then strFilter = strFilter & ",1"
  6.   If Me.chkFeb Then strFilter = strFilter & ",2"
  7.   If Me.chkMar Then strFilter = strFilter & ",3"
  8. .
  9. .
  10.   If Me.chkDec Then strFilter = strFilter & ",12"
  11.   If strFilter > "" Then
  12.     strFilter = "Month([PayDate] In(" & Mid(strFilter, 2) & ")"
  13.     Call DoCmd.OpenReport(rptDues, acViewPreview, ,strFilter)
  14.   Else
  15.     Call DoCmd.OpenReport(rptDues, acViewPreview)
  16.   End If
  17. End Sub
I chose to use the more appropriate In() construct for the Filter here as it fits in more neatly. It would be possible to create a string which had a bunch of clauses ORed together like :
Expand|Select|Wrap|Line Numbers
  1. (Month([PayDate])=1) OR (Month([PayDate])=3)
For a report showing January AND March Dues.

Please let me know how you get on with all this. If you do have problems, please try to explain exactly where, relative to what I was saying.
Jul 23 '07 #12
RZ15
53 New Member
I have a question regarding this.

NeoPa, what you have outlined, that results in a total amount due for the customer in whatever months selected, correct? Is there any way to show the months as fields and have amount due for each month shown if the query the report is based on used has a field for each corresponding month?

So if the user checked January and February, they will see the fields January and February and none of the other months.
Jul 23 '07 #13
NeoPa
32,578 Recognized Expert Moderator MVP
I'm sorry RZ, but your post (though it may seem connected) is off topic. You will need to post your own (separate) question about this. You may include a link to this one if you think that may help to explain it better, or even (in this case) a link from here to your new thread. That way experts involved in this thread may get a hook in. It also gives the opportunity for other experts to get involved. What you're asking is actually a lot more complicated and un-database like than maybe you realise.
Good luck with your question.
Jul 23 '07 #14

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

Similar topics

8
7590
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
1547
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
2727
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
1696
by: alem | last post by:
Hallo pls help me how to create Report in Visual Basic.
1
2165
by: SantyBhi | last post by:
Plz , any one can explain how to create report in c#asp.net without using Crystal Report.
0
9647
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
10357
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...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8988
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...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
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
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.