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

Limit combo box by customer

I'm a complete noob so excuse my ignorance.

I'm looking for a simple drop down list on a form that limits the choices to foldernames that relate to the customer.

I have three tables named customer, website and orders.

I have a form named customer. I can lookup a custom and see just the domains he owns on a subform 'orders subform' that pulls info from the orders table.

What I want to do is add a combo box to the 'orders subform' that shows all the related foldernames for that customer to be select from. The foldername is a field found on the website table. From the list of foldernames if I select one it should then bind the one possible foldername for each domain. A domain can have only one foldername but a foldername can have many domains.

Each table has the primary or secondary key customerid. Both the order and the website table have a websiteid field.

So, I tried making a query that listed all foldernames and domainnames where the customerid matched and then just adding a combo box to the 'orders subform' with the rowsource pointing to the query but my drop down shows me all 235 records for all customers and not the one I'm currently looking at.

If this makes sense can anyone help?
Feb 2 '07 #1
2 1627
Rabbit
12,516 Expert Mod 8TB
I'm a complete noob so excuse my ignorance.

I'm looking for a simple drop down list on a form that limits the choices to foldernames that relate to the customer.

I have three tables named customer, website and orders.

I have a form named customer. I can lookup a custom and see just the domains he owns on a subform 'orders subform' that pulls info from the orders table.

What I want to do is add a combo box to the 'orders subform' that shows all the related foldernames for that customer to be select from. The foldername is a field found on the website table. From the list of foldernames if I select one it should then bind the one possible foldername for each domain. A domain can have only one foldername but a foldername can have many domains.

Each table has the primary or secondary key customerid. Both the order and the website table have a websiteid field.

So, I tried making a query that listed all foldernames and domainnames where the customerid matched and then just adding a combo box to the 'orders subform' with the rowsource pointing to the query but my drop down shows me all 235 records for all customers and not the one I'm currently looking at.

If this makes sense can anyone help?
If I understand everything correctly, you have 3 combo boxes. Customer, FolderName, and Domain.

What you want to do is have code for the After Update and On Current events. The After Update and On Current events will have the same code for their corresponding fields. The coding for each three fields will only differ slightly.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Customer_AfterUpdate()
  2.   Me.[FolderName].RowSource = "Select [Domain] From Orders Where [FolderName] = '" & Me.[FolderName] & "'"
  3. End Sub
  4.  
Hopefully you can continue from here.
Feb 2 '07 #2
NeoPa
32,556 Expert Mod 16PB
This link (Example Filtering on a Form.) may help you to build the form as you want it.
Feb 5 '07 #3

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

Similar topics

1
by: Paolo | last post by:
I would like some help on the use of combo boxes. I have created a form and named it Customers. This form's record source is a table, also named Customer. I would now like to add an unbound combo...
1
by: Me | last post by:
Hi, In my application, I have two records, customers and transactions.Each customer may have many transactions and so I have created a one to many relationship between them. I have a form...
6
by: Reggie | last post by:
Hi and TIA! I have a bound combobox with rowsource set to value list, limit to list=true and NotInList procedure to add(or not) a value the user types in. This works fine and it does add the...
3
by: Marcus Canales | last post by:
Hello all, Here is my situation. I have a combo box on a form. The combo box is linked to a qry (qryCustomers) and the form is linked to tblOrders. The way I currently use the combo box is to...
8
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through...
3
by: Mindy | last post by:
Does anyone know the difference between Navigational and Lookup features of combo boxes? I wondered if there were difference between these two if we selecte "remember the value for later use" when...
0
by: Dawnyy | last post by:
I have a form which is bound to a dataset. I am filling the forms dataset on Form_Load event. On my form I have combo boxes which I am setting by running a stored procedure to return a datatable,...
1
by: CD Tom | last post by:
I've been using the combo box in my forms and haven't ever had any problems but lately been having problems with the autoexpand. Here's what is happening. I have two combo boxes on a form one looks...
1
by: slenish | last post by:
Hello all, I am trying to make it so a combo box will only display records of the last 5 days worth of information from the drop down. Currently I have the drop down using a query that I have...
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?
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
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,...
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...

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.