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

Drop Down Issues

I am new to using Access and am trying to populate a listbox based on
another listbox. My first box has the name of various customers. I
have another listbox that populates the service location. This works
fine most of the time. The problem is, one of the customers has
multiple sites. I am not allowed to write over the service location
and do not want to list the customer more than once in the customer
box. Does someone have a way to help me with this problem?

Thanks,
Carolyn

Apr 3 '07 #1
3 1259
Can you confirm that you have 1 table containing at least

CustomerID
CusName

and a second table containing at least
AddressID
AddLine1
AddLine2
AddLine3
Town
County
PostCode
CustomerID
& probably HeadOffice (True or false)

If so not too difficult

"Carolyn" <ca***********@nscorp.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
>I am new to using Access and am trying to populate a listbox based on
another listbox. My first box has the name of various customers. I
have another listbox that populates the service location. This works
fine most of the time. The problem is, one of the customers has
multiple sites. I am not allowed to write over the service location
and do not want to list the customer more than once in the customer
box. Does someone have a way to help me with this problem?

Thanks,
Carolyn

Apr 4 '07 #2
On Apr 4, 10:29 am, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Can you confirm that you have 1 table containing at least

CustomerID
CusName

and a second table containing at least
AddressID
AddLine1
AddLine2
AddLine3
Town
County
PostCode
CustomerID
& probably HeadOffice (True or false)

If so not too difficult

"Carolyn" <carolyn.ev...@nscorp.comwrote in message

news:11**********************@l77g2000hsb.googlegr oups.com...
I am new to usingAccessand am trying to populate a listbox based on
another listbox. My first box has the name of various customers. I
have another listbox that populates the service location. This works
fine most of the time. The problem is, one of the customers has
multiple sites. I am not allowed towriteoverthe service location
and do not want to list the customer more than once in the customer
box. Does someone have a way to help me with this problem?
Thanks,
Carolyn- Hide quoted text -

- Show quoted text -
Yes. I do have 2 tables that contain that information.

Apr 16 '07 #3
So the first combo box should have the record source SELECT CusName,
CustomerID FROM Customer ORDER BY CustomerName
2 Columns widths say 3cm, 0cm , Bound Column 2 Name CusIDRelay, Not Bound

Assuming the form is based on a query based on the 2 tables (I assume you
have set up a relationship between them) then you need an Event On Update
Sub CusIDRelay_AfterUpdate()
DoCmd.GoToControl "CustomerID"
DoCmd.FindRecord CusIDRelay
End Sub

The second ComboBox should have the recordsource something like

SELECT AddLine1, Town, AddressID
FROM Address
WHERE CustomerID = forms!Customer!CustomerID
ORDER BY AddLine1;

3 Columns widths say 3cm, 3cm, 0cm , Bound Column 3 Name AddIDRelay, again
not bound

similar bit of code

Sub AddIDRelay_AfterUpdate()
DoCmd.GoToControl "AddressID"
DoCmd.FindRecord AddIDRelay
End Sub

Hope this helps

Phil

"Carolyn" <ca***********@nscorp.comwrote in message
news:11*********************@o5g2000hsb.googlegrou ps.com...
On Apr 4, 10:29 am, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Can you confirm that you have 1 table containing at least

CustomerID
CusName

and a second table containing at least
AddressID
AddLine1
AddLine2
AddLine3
Town
County
PostCode
CustomerID
& probably HeadOffice (True or false)

If so not too difficult

"Carolyn" <carolyn.ev...@nscorp.comwrote in message

news:11**********************@l77g2000hsb.googleg roups.com...
>I am new to usingAccessand am trying to populate a listbox based on
another listbox. My first box has the name of various customers. I
have another listbox that populates the service location. This works
fine most of the time. The problem is, one of the customers has
multiple sites. I am not allowed towriteoverthe service location
and do not want to list the customer more than once in the customer
box. Does someone have a way to help me with this problem?
Thanks,
Carolyn- Hide quoted text -

- Show quoted text -

Yes. I do have 2 tables that contain that information.

Apr 17 '07 #4

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

Similar topics

2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
1
by: msnews.microsoft.com | last post by:
I'd like to hear your thoughts on best methods for populating drop down list controls. I have states and countries drop down lists that don't change often, so naturally I "hard code" them in the...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
6
by: Joey Liang via DotNetMonster.com | last post by:
Hi all, I have a drop down list which store all the different brands of product.When i selected the particular brand from the drop down list, it will display all the products with the selected...
2
by: tpaulson | last post by:
I have a couple of DIV's that I hide/display based on radio buttons. On the DIV's, I have multiple drop down boxes. The source shows that they are populated, but I can't make them drop down. Only...
8
by: Ed Dror | last post by:
Hi there ASP.NET 2.0 VB & SQL Express Lest take Northwind Categories Products as example I create a table that hold these two together and I create a stored procedure like select ProductID,...
3
by: Rick | last post by:
In VS 2003, in the class name drop down there is an option for (Overrides) if your code behind inherits another class. this option does not seem to be available in VS 2005, or is there some option...
1
by: lydialysol | last post by:
I don't have any issues creating drop down menus utilizing PHP and Mysql or posting that information back to the database. My issues comes when I retrieve the records for updating purposes. The...
2
by: laredotornado | last post by:
Hi, If any of you have a Google home page ... http://www.google.com/ig you'll notice that when you click on the drop down arrow graphic for each module, there is a drop down menu that appears....
2
techtherapy
by: techtherapy | last post by:
Hello everyone. Not sure if I should be posting in the javascript forum, the flash forum, or this one since the problem deals with all three! So my issue is this: My company is updating a...
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: 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: 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...

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.