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

Can I create a ComboBox from Variable Tables?

Greetings!

I have been using the basic functions in Access for many years and have been able to take care of all my needs until now. My research on this topic indicates that I must use VBA code to complete the task, but I don't even know where to start. Let me give you some details.

Platform is XP Pro, Access version is 2003

Tables: LogBook, Locations, EquipNE, EquipSE, EquipNW, EquipSW

I have a form in the LogBook table where data will be entered from. On that form I have a ComboBox (Object10) that is populated from the Locations table, (this part I have working OK). There is only 1 field in the Locations table titled "Locs" and there are currently only 4 records in this table. The 4 records are NE, SE, NW, SW. The remaining 4 tables have only 1 field titled "Equip" and may contain between 5 and 30 records.

What I want to do is add a second ComboBox (Object20) that will be populated based on the selection that is made in Object10. In other words if the user selects "SE" from Object10, I want Object20 to be filled with the equipment records in the EquipSE table. But if the user selects "NW" from Object10, I want Object20 to be filled with the equipment records of the EquipNW Table.

From what I've read, I assume I am going to need to use some type of array or loops, but I just don't know where to start. Is what I want to do even possible?
Jan 18 '08 #1
1 1566
missinglinq
3,532 Expert 2GB
The concept is called Cascading Comboboxes and here's an excellent tutorial on the subject from our very own Rabbit! Cascaing Combo/Listboxes

Welcome to TheScripts!

Linq ;0)>
Jan 18 '08 #2

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

Similar topics

2
by: Phil | last post by:
My form uses a dataset containing two tables, a base table (Contact) and a lookup table (Insurer). My combobox is bound as follows: DataSource = datasetContact DisplayMember =...
0
by: Doug | last post by:
This is a repost of an item that I still cannot resolve. I have 3 combo boxes. The first leads to the second to the third. When I have selected a value in the second box, the third box shows...
0
by: jaYPee | last post by:
i have a datagrid in my form that has a combobox in it. the actual data of a combobox is a number because this is a foreign key from another table. i can create tag successfully in combobox located...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
7
by: samoore33 | last post by:
I am trying to dynamically add items to a listbox or combobox. The items add to either, but when I look through those items, there is nothing there. If I choose an item, it shows up. Not sure...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
2
by: tshad | last post by:
In my VS 2003 Windows Forms page, when I initially fill my ComboBox (SystemList), it goes to the SelectedIndexChanged event which calls the Loademails() function. I then call it again in the...
4
by: Greg (codepug | last post by:
Private Sub cboBody_KeyDown(KeyCode As Integer, SHIFT As Integer) 'Delete combobox entry if Del or Backspace key is hit. If (KeyCode = 46) Or (KeyCode = 8) Then Me.cboBody = "" End Sub I have...
1
by: Uli Netzer | last post by:
between Dim strXYZ() as String and Dim strXYZ as String() It doesn't seem to make a difference in the way I use the variable. Another problem I have. I load three variables with 3 values...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.