Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-19-2017, 08:55 PM   #1
shafara7
Newly Registered User
 
Join Date: May 2017
Posts: 118
Thanks: 23
Thanked 0 Times in 0 Posts
shafara7 is on a distinguished road
Combobox filter combine multiple records

I have a Form with a Subform on it and I want to build a combobox to filter the location.
How do I combined two or more sub-location into one?

For example I have two tables that arrange the location in General Location and into Measuring Location.

Table General Location:
LocationID / LocationShortForm / LocationName
1 USA United States
2 CHN China
3 AUS Australia

Table Measuring Location (ML)
ML-ID / indLocationID / txtML-Name /
1 3 Melbourne
2 1 New York
3 1 Texas
4 2 Beijing
5 3 Sydney
6 1 Florida

My combobox should be based on table General Location with that 3 choices.
So that for example when I clicked on USA, the records for New York, Texas and Florida will be shown at the same time.

My question are:
1) Should I build a new table or a new query, that will sum up all the records in a general location?
2) I'm thinking of doing VBA codes using Select Case but I don't know how. Can anybody outlined how I should write it?

Thank you.

shafara7 is offline   Reply With Quote
Old 06-19-2017, 10:13 PM   #2
Uncle Gizmo
Nifty Access Guy
 
Uncle Gizmo's Avatar
 
Join Date: Jul 2003
Location: Newbury Berks UK
Posts: 10,307
Thanks: 534
Thanked 937 Times in 888 Posts
Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough
Send a message via Skype™ to Uncle Gizmo
Re: Combobox filter combine multiple records

I'm not getting a clear message of what you mean. Probably 'cause i just got up!

I thought this might be worth a look:-

https://sites.google.com/site/msacce...ng-combo-boxes

Sent from my SM-G925F using Tapatalk
__________________
Code:
                 |||||
               @(~^~)@
-------------oOo---U---oOo-------------
|                                     |
|      Uncle Gizmo              |
|                                     |
|                                     |
| Get $20 worth of "Nifty Code"       |
|      
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| | Ooo | |_________________ooO____( )________| ( ) ) / \ ( (_/ \_)
Uncle Gizmo is offline   Reply With Quote
Old 06-20-2017, 12:44 AM   #3
shafara7
Newly Registered User
 
Join Date: May 2017
Posts: 118
Thanks: 23
Thanked 0 Times in 0 Posts
shafara7 is on a distinguished road
Re: Combobox filter combine multiple records

Thank you! I just figured out that I just need to add Grouping in my combobox query.
It works now.

shafara7 is offline   Reply With Quote
Reply

Tags
combobox , filter , multiple records , select case

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple records - how to combine in one? foxmark Queries 1 08-24-2011 12:50 AM
Combine two Fields to One with Multiple Records PureCoffee Tables 11 03-17-2010 05:56 AM
combine multiple records into a single mailmerge bluetongue Modules & VBA 1 03-08-2009 04:55 PM
Combine multiple records furiousweebee Forms 5 01-30-2009 07:57 AM
combine multiple records delb Modules & VBA 3 12-18-2008 07:11 AM




All times are GMT -8. The time now is 06:12 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World