473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Create a "Control" Form to specify filters to display specific forms & reports

12
Hi,
I am a newbie using Access 2013.
I have a database with information of our group of companies, list of banks and the list of bank accounts these companies have with the respective banks.

The existing relationship between the main tables currently:
Banks(one)-->(many)Bank Accounts(many)<--(one)Companies

I would like to create a main "Control" Form that will allow me to specify the filters I need, to display my records in my existing forms/reports as such:

1) View and edit a specific Company Details in the Company Details Form

2)Filter Bank Accounts and view by:
- by specified currency
- by specified bank
- by specified company
- by specified account type

Of course I have plenty more filter requirements but I believe if the ones above are solved, I'm good to go with the others.

Thank you very much in advance!
Sep 17 '13 #1

✓ answered by zmbd

Agreed with jimatqsi.
Also please provide the answers to J's questions, these will be most helpful - I would also ask, which version of Access are you using and, if you are working with linked tables, what type of database are the linked tables linked to (access, sql, mysql, oracle, etc..)?

You may want to consider more than one form for what you describe.

In the meantime, you may find the following to be of some use, don't let the code and the like in these weigh you down. Read thru them first and see if the descriptions are anything like what you want, from there we can help you weed thru the concepts:

-filtering-

8 2034
jimatqsi
1,271 Expert 1GB
That's a pretty tall order. It's one thing if you approach a new design project with that idea in mind, but to retrofit an existing system is something else. If one guy wrote the system or one design philosophy was consistently followed there may be some patterns to take advantage of. But of course we can't see what your're starting with.

Is this an all-Access app or is the data in linked tables?

You might consider making a parameter table and a matching pop-up form to edit the parameters. Then every form, report, or query will need to either join a query appropriate to the target (company or bank account); or you could write a vba function that gets called from each of the forms/reports/queries and returns a true/false value based on comparing parameters passed. I guess you wouldn't have to have a parameter table, you could just keep the form that maintains parameters open all the time and each form/report/query makes a comparison against the objects on the form rather than in a table. But I think it's cleaner with a parameter table.

Jim
Sep 17 '13 #2
zmbd
5,501 Expert Mod 4TB
Agreed with jimatqsi.
Also please provide the answers to J's questions, these will be most helpful - I would also ask, which version of Access are you using and, if you are working with linked tables, what type of database are the linked tables linked to (access, sql, mysql, oracle, etc..)?

You may want to consider more than one form for what you describe.

In the meantime, you may find the following to be of some use, don't let the code and the like in these weigh you down. Read thru them first and see if the descriptions are anything like what you want, from there we can help you weed thru the concepts:

-filtering-
Sep 17 '13 #3
Bellina
12
Hi,
I am using Access 2013, and yes, it's all Access based.

Here are the list of Objects that I have:

Tables|{Fields}
Bank Accounts| {ID, Company, Bank Name, Account Number, Account Type, Currency, Account Status, Purpose}
Banks| {ID, Bank Name, Branch Name, Contact Person,Phone, Country}
Companies| {ID, Company Short Name, Company Name, Company Status, Functional Currency, Contact Person, Phone, Country}
Currency List| {Currency Code, Currency Name}

Queries|{Fields}
Active bank accounts| {Company, Bank Name, Account Number, Currency, Account Type, Purpose}
Bank Extended|{Bank Name(combination of Bank Name & Branch Name), Banks.*}
Companies Extended|{Company(combination of Company Short Name & Company Name), Companies.*}
Private companies bank accounts| {Company Status, Company Name,Bank Name, Account Number, Currency, Account Type}

Forms
Bank Account Details
Bank Account List
Bank Accounts Datasheet Subform
(included in the Company Details form)
Bank Details
Bank List
Company Details
Company List


Reports - still working on this one, hoping to solve this issue in order to display the required data in the reports.

I like the idea on the parameter table. How do I start on this?

Thanks guys!
Sep 18 '13 #4
zmbd
5,501 Expert Mod 4TB
Would you mind adding in the relationships:
For example
Bank Accounts| {ID, Company, Bank Name, Account Number, Account Type, Currency, Account Status, Purpose}
Banks(one)-->(many)Bank Accounts(many)<--(one)Companies

You can simply do this:
Bank Accounts| {Banks(one)-->(many)Bank Accounts(many)<--(one)Companies}

for each of the relationships and I can edit this back into your post.


"parameter table" you may not need this... however, once we understand the table relationships we can go from there.
Sep 18 '13 #5
jimatqsi
1,271 Expert 1GB
First, design your parameter table. You'll need a column for each parameter - maybe even two columns if you propose to use a from/to range for some elements. You may also want a column to specify the report or query that is to be filtered by the particular row of parameters.

Then, make a form to edit the parameter values. You might even consider making this form a launcher, basically a menu to run programs based on these parameters. So you add objects to edit each of the parameters, and a button for each report or query you want to run after setting the parameters. You'll of course have to modify the reports and queries to pay attention to the parameter values. One way to do that might be to use DLookup calls in the where strings of each query involved. Another would be to join the parameter table to your queries, but it complicates things a bit.

I've avoided getting too granular with this explanation. We'll depend on you to let us know the level of detail help you need.

Jim
Sep 18 '13 #6
jimatqsi
1,271 Expert 1GB
By the way, I don't like so much the parameter table idea for forms. Look at the links zmbd provided regarding form filtering. It's much preferable to give the user control over filters right there in the form they're working on.

Jim
Sep 18 '13 #7
zmbd
5,501 Expert Mod 4TB
There are two ways to approach the parameters table:
As J has pointed out, one row, multiple columns
or
three/four columns and multiple rows.

The first is ok for small setups that will not need to be maintained and can be fairly easy to use, the second is easier to maintain but a little harder to use.

So the First Option:
Expand|Select|Wrap|Line Numbers
  1. [PK][parameter1][parameter2][prameter3][...limit 255...]
  2. [1]   [first]   [second]     [third]      [...]
  3.  
and the Second:
Expand|Select|Wrap|Line Numbers
  1. [pk][report_form_filter][parametername][parametervalue]
  2. [1] [report1]    [pname1]       [pvalue1]
  3. [2] [report1]    [pname2]       [pvalue2]
  4. [3] [report1]    [pname3]       [pvalue3]
  5. [4] [Filter1]    [pname1]       [pvalue1]
  6. [5] [Filter1]    [pname2]       [pvalue2]
  7. [6] [Filter1]    [pname3]       [pvalue3]
  8. [...]
Personally, when using a form to find records, and I want a report based on those records, I pass the form's filters on to the report.

So, say I have a query that pulls all of the table data, formats it and does all of the calculations. I have a form based on this query and a report. So using a combobox as a filter on the form, I can filter out everything except what I'm after... so I can pass this filter value to the report and open it for preview before printing:
DoCmd.OpenReport"rptReport",acViewPreview,,"fieldn ame =" & Me.CBO

A little more information on that:
DoCmd.OpenReport Method - Office 2007
Sep 18 '13 #8
Bellina
12
Hi,

To reply on the relationships. The one I listed down earlier is basically it.

Bank Accounts| {Banks(one)-->(many)Bank Accounts(many)<--(one)Companies}

Currency List|{Companies(many)-->(one)Currency List(one)<--(many)Bank Accounts}
*this is basically to allow users to select from the currency list for the Companies' main currency and the bank accounts currency

I'm reading on the form filtering like you guys have mentioned. Yeah, the parameters table looks a bit tough for a newbie like me.

Thanks!
Sep 19 '13 #9

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

Similar topics

2
by: Timppa | last post by:
Hi, I have Access 2000 and now I'm converting .mdb database to .adp and Sql Server 2000. In old .mdb application I have a query which handles msysobjects table (reading forms and reports...
1
by: Nicolae Fieraru | last post by:
Hi All, I am working on an Access 2000 project where it was necessary to rename some fields in a table or to delete some fields and to recreate new ones. Now there are many forms and reports...
2
by: misscrf | last post by:
I have a search form that is great. I have modified it in such a way, that when search results come up I can bring it back to a useful spot, say an entry form or a report. Here is my lemon (...
2
by: B. L via AccessMonster.com | last post by:
I have a Database with a Simple Switch board and multiple reports and forms. All of a sudden When i go and open up the database it says it can't find my forms or reports, but the tables and quiries...
2
by: xmutantduck | last post by:
Hi, I am trying to write a program that can spawn forms when running in an alternate thread outside the main one. It however doesnt like to do anything related to the first thread when in the...
4
by: Steven | last post by:
Hi, I have a database table field to store the form name, I want to create the particular windows form by using the value that read from that DB field. For examples, the table field has a value...
3
by: warnold | last post by:
my table contains a lot of fields, so i want to create a form with a combo box and a (probably) text box that goes like this... the combo box display the fields in the table. (this i've already...
4
by: aflat362 | last post by:
If you look at this page on relational database design: http://r937.com/relational.html And scroll down to the "Many-to-Many Relationships" Section you will see a common database structure. ...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
5
by: erog | last post by:
Hello I've tried using the MS Access Northwind sample DB and I've downloaded a few other sample Microsoft Access DBs from their website. I keep on running into the same problem for trying to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.