473,383 Members | 1,792 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,383 software developers and data experts.

Combo box and List box selection

102 64KB
Hello friends
y
I need your help. I want to run a report through 3 selection.
Company
Region
Territory

All selection is made by Combo Box and List Box. When I select Company, it must display only Region and Territory which are falls in this company. and then run the report.

Problems is that, some Regions and Territory are in both Companies.

Now how to do it. via query or vba code.

Can some one help me
Thanks
Jan 10 '16 #1
4 1141
zmbd
5,501 Expert Mod 4TB
irsmalik:

Simple answer to your question of VBA or Query: Yes, either, both, and, or. -- Thing is you can do this with a query and/or VBA.

There are dozens of ways to reach your goal; however, we need to have a better understanding of your current situation, such as which version of Access/Office you are using, your experience level, how you are feeding your data to the report etc...

However, even without the afore mentioned information, what I think you're root problem starts with is that it sounds like you need to normalize your data:
home > topics > microsoft access / vba > insights > database normalization and table structures

Once you have a properly normalized database and established the proper relationships, one of the easier methods is to setup a form that allows you to pass your selections either as conditionals to the report or as parameters to a query (various ways to do that) that serves as the record source for the report.


--
I typically use cascading combo-boxes (home > topics > microsoft access / vba > insights > cascaded form filtering ) on a form to filter down the database to show the records that will be printed and have a command button open/print the report. Sometimes I send the selected criteria to report, other times I have the query parameters based on the form, and yet other times I've actually built and set the record-source for the report on-the-fly.
Jan 10 '16 #2
irsmalik
102 64KB
Dear ZMBD

Thanks for your reply. I will be thankful if you please look at my attachment.

I have done something. Actually I want to make a database for company's dealers record. Company has 2 parts (names) and there are Regions and Territories.

Some Regions and Territories are in the both companies. I have created tables, queries and a form to run my report. I want to di
Jan 11 '16 #3
irsmalik
102 64KB
Dear ZMBD
Thanks for your reply. I will be thankful if you please look at my attachment.

I have done something. Actually I want to make a database for company's dealers record. Company has 2 parts (names) and there are Regions and Territories.

Some Regions and Territories are in the both companies. I have created tables, queries and a form to run my report. I want to display only Region and Territory for ONLY 1 company. Not all records.

I have tried. Now I select company and its Regions display. But Territories under that Region are not being displayed.

I will be really thankful if you please check my attachment and CATCH my mistake.
Thanks
Attached Files
File Type: zip test3.zip (77.3 KB, 31 views)
Jan 11 '16 #4
zmbd
5,501 Expert Mod 4TB
irsmalik,
I'm sorry, I don't routinely download unrequested attachments; mostly because I work in a secured environment that prohibits doing so.

Instead, what I need you to do is:

+ list the tables you currently have in your database and any relationships you've established (if you do not understand this, then please follow the link on table structures in my first reply).

+ The query you are using for your report, please post the SQL for this (formatted using the [CODE/] tool, please :) )

+ Behind your form, do you have any VBA or Access-Macro running for any of control's or form's events?
Jan 13 '16 #5

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

Similar topics

1
by: BigJay | last post by:
I am 1. trying to have a combobox used as a selector to display records in a subform. and not sure on how to get selected info into subform.the combo is populated but can not get subform updated...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
3
by: sstasiak | last post by:
Hello all I have read similar threads on this site, but can't seem to get any of the solutions working for me. I have a main form(OncRegMain) that adds records to a table(tblOncReg). This table...
3
by: wideasleep | last post by:
Hello Everyone, I am looking for a way to trigger specific subforms to come up in a form through a combo box selection. For example purposes my selection in the combo box is CCP-03-081-FRM-14. The...
1
gcoaster
by: gcoaster | last post by:
Hello, Access is accessing my patience! how does one filter just one form with a single combo box selection? I have a combo box named "cboCallStatus" unbound Row source type = Value...
1
by: zufie | last post by:
Hi, When I make a selection from the drop down list of values on a Combo Box. The Combo Box is on a Form. The Combo Box selection appears on ALL of the records. That is, when I select one...
27
by: DanicaDear | last post by:
Dealing with electric utility rubber gloves..... tblCOMMODITY contains fields CLASS, SIZE, & COMMODITY_NUM (PK). A class combined with a size make a commodity number. I don't want the user...
3
by: ranga044 | last post by:
Hi Guys, I'm implementing a system these days, i want to implement a combo box selection process but i don't know how to implement it, so asking you guys favor? my scenario is this, let's say...
6
by: Stoic | last post by:
I think I am making some mistake here but maybe someone can help find out the mistake. This is what I have: Private Sub Report_Activate() UpdateHeader End Sub Public Sub UpdateHeader() ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.