473,404 Members | 2,187 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,404 software developers and data experts.

Automatic Data

I have a Access 2000 database.
I have one table with two fields Location and Section
I have 2 list boxes on a form - one for location and one for section

Is there a way to when the user selects from one of the lists, the
other list automatically updates as well?
Nov 13 '05 #1
2 1266
Yes, there is, but it may be difficult with the setup you have. You indicate
that you have one table with two fields. That would mean that there is a
one-to-one relationship between the two fields (they're each in the same
record) so if Record1 is selected for Location then Record1 would be
selected for Section. You don't need two listboxes to do this, you could
simply make one listbox with two columns.

To update one listbox upon the selection in another listbox, the
relationship is usually a one-to-many relationship. For example, the first
listbox would be a list of States. Then in the second listbox you would have
a list of Cities appear that are in the selected State.

--
Wayne Morgan
MS Access MVP
"Heather" <HW******@cox.net> wrote in message
news:cb**************************@posting.google.c om...
I have a Access 2000 database.
I have one table with two fields Location and Section
I have 2 list boxes on a form - one for location and one for section

Is there a way to when the user selects from one of the lists, the
other list automatically updates as well?

Nov 13 '05 #2
There is a simple way.

Lets call the 2 combo boxes on your form C1 and C2

Then on the OnEnter event of each combo box.:
for C1 enter: c1.requery
for C2 enter: c2.requery

This way every time you click on the field it will re-lookup its source.
"Heather" <HW******@cox.net> wrote in message
news:cb**************************@posting.google.c om...
I have a Access 2000 database.
I have one table with two fields Location and Section
I have 2 list boxes on a form - one for location and one for section

Is there a way to when the user selects from one of the lists, the
other list automatically updates as well?

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
7
by: Ben R. | last post by:
How does automatic type casting happen in vb.net? I notice that databinder.eval "uses reflectoin" to find out the type it's dealing with. Does vb.net do the same thing behind the scenes when an...
4
by: Philip Nelson | last post by:
Folks, I've got a database and tablespaces "managed by automatic storage". I've deleted a lot of data from some tables. I've then reorged them. But the tablespaces don't appear to shrink...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
4
by: beena | last post by:
All, I'm new to the concept of automatic storage... I'm looking at the database setup by a vendor. I see few tablespaces showing up with automatic storage - Yes. Tablespace ID ...
0
by: RG | last post by:
I have a stored procedure which is called by db2 "call ....." statement from ksh script. When running from AIX DB2 v. 9.1.3 environment, after a while the stored procedure starts to hang and...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
0
by: swamimeenu | last post by:
Hi, I need to add a automatic serial number in datareport in vb without having tht field in database.. but the remaining fields are connected from db... how to generate automatic serial number...
0
by: cephal0n | last post by:
Hi All! I have two table tblHome1, contains all the unique PinNo and tblHome2 contains a duplicated PinNo and description. I put an automatic numbering (ProdID) and set it as my index. What I want...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
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
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
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
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.