I have 2 dropdown boxes on my form, both which pull from table I made for each. First I select the Service that I want, then I want the Service Type to be limited to the types only with the Service ID that matches the ID from the first box. How do I implement this?
10 1732
I have 2 dropdown boxes on my form, both which pull from table I made for each. First I select the Service that I want, then I want the Service Type to be limited to the types only with the Service ID that matches the ID from the first box. How do I implement this?
Try something like this behind your combo box's row source -
SELECT table.servicetype FROM table table.service HAVING (((table.service)=forms!YourformName!Sevice-Combobox-name));
-
SELECT table.tblServic eType FROM table table.tblServic e HAVING (((table.tblSer vice)=forms!frm Main!Combo24));
I think i changed this right. Here are the names I am using for the different items:
Tables are
tblService
tblServicetype
Form is
frmMain
Combo box is
Combo24
this is not an extensive database, this shouldnt be to hard to do. When I modified what you gave me, I have nothing in the Service type box
Very good example. The only problem is that now I have the ID showing in the second dropdown, not hte ServiceType.
MMcCarthy 14,534
Recognized Expert Moderator MVP
Very good example. The only problem is that now I have the ID showing in the second dropdown, not hte ServiceType.
You need to change the column widths property to hide the ID and make sure your column count = 2.
Column Count 2
Column Widths 0cm; 3cm (For example)
Mary
Here is what I have done, Now it doesn't work at all.
From the website sent to in previous post
Private Sub Combo24_AfterUp date()
Dim strSQL As String
strSQL = "Select " & Me!Combo24
strSQL = strSQL & " from Categories"
Me!Combo46.RowS ourceType = "Table/Query"
Me!Combo46.RowS ource = strSQL
End Sub
Combo24 is my first box and 46 my second
Then put this in row source of Combo46
Select ServiceIDID, Service from tblService Where ServiceID= Forms!frmMain!C ombo24;
Then in after update of Combo 24 put
Private Sub Combo24_AfterUp date()
Me!Combo46.Requ ery
End Sub
This isnn't working. Contact by email if easier, I am supposed to have this database finished today and this is all that is left. Thanks for helping. rcollins@mds.ac sol.net
MMcCarthy 14,534
Recognized Expert Moderator MVP -
strSQL = "Select " & Me!Combo24
-
strSQL = strSQL & " from Categories"
-
Me!Combo46.RowSourceType = "Table/Query"
-
Me!Combo46.RowSource = strSQL
-
This doesn't make sense. Me!Combo24 is a value not a field name. You can't select a value from a Table
Mary
Thank you for your responce. I actually had to change some things in my database, but I got it to work following an examlpe that I found online. Thanks
MMcCarthy 14,534
Recognized Expert Moderator MVP
Thank you for your responce. I actually had to change some things in my database, but I got it to work following an examlpe that I found online. Thanks
No problem
I'm glad you got it working
Merry Christmas
Mary
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: reneeccwest |
last post by:
Different user input boxes are automatically populated based on a
value of the dropdown box.
Can anyone help me on that?
|
by: ahoodless |
last post by:
hi i have a problem that I have tried desperately to tackle but cannot
seem to complete. basically i am trying to create a form with three
dropdown lists, the tricky part is i want the 3rd drop down box's
options to be dependant on the choice made in the 2nd dropdown...and
the 2nd dropdown's options to be dependant on the choice made in the
1st dropdown. For example:
1st dropdown
product 1
|
by: Mark |
last post by:
I have two dropdown lists. Both have autopostback set to true. In both
dropdowns, when you select an item from the list, it redirects to the Value
property of the dropdown. Nothing fancy.
Let's say you select 1 of the items, and are properly redirected. You press
the back button. I have three servers providing two different
functionalities:
1. After pressing the back button, the item you selected in the dropdown is
still selected.
|
by: Cheryl |
last post by:
I have grabbed a menu from a javascript site (
http://www.dynamicdrive.com/dynamicindex1/topmen3/index.htm ) and added to
my page.
The problem is however the dropdown comes down on top of text and input
boxes , as you would expect and desire, *but* behind dropdown boxes on the
page.
Surely there is a simple fix for this?
|
by: |
last post by:
im dynamically loading dropdown boxes on page.load
like this :
cbo1.Items.Add("")
cbo1.Items.Add("OT")
cbo1.Items.Add("ST")
cbo1.Items.Add("Ho")
cbo1.Items.Add("FMLSK")
cbo1.Items.Add("FMLOI")
cbo1.Items.Add("FMLPE")
| |
by: gary |
last post by:
In our site we are encountering problems with drop down boxes. We have
a dropdown box & the ONChange event of which is fetching some data from
a servlet. However when we use history back button , the data of
previous page is displayed correctly but the dropdown selected index
always lags behind by one.
For instance if the selected index of dropdown is 1 data relating to it
is diplayed on table, if second option is selected a call to...
|
by: Gil |
last post by:
Is there a way to tell if a combbox is in dropdown mode.
I tried and if statement combobox.dropdown = true
but i get an error. dropwndown function doesnt store if its true or
false
what i am trying to do is make an autoscroll combobox. like you have on
html textbox's, but this time you hit enter for a change to be made. i
do this because i dont want to requery every time a single letter is
inputed. it would be too slow. so i make them hit...
|
by: Jason James |
last post by:
Hi,
I have a datalist that contains a series of thumbnails. I am
in the process of paging this datalist so that only 20 images
are displayed at a time. Each image has associated with
it a pair of dropdown boxes. The user selects theor choices
from the dropdown boxes and then moves to the next
series of 20 images. The postbackURL of the button
click contains the information regarding the next page to
display.
|
by: Kitten |
last post by:
I'm maintaining a site which has a page to show information by the date. It has 3 dropdown boxes - day, month and year. Day is sorted already. The year must only show this year and last year, which is also sorted. Now we come to the tricky part - the month dropdown box must show the months up to this month when this year is selected and from this month to the end of the year if last year is selected. It must be completely dynamic and client...
|
by: Wingot |
last post by:
Hey,
I have a program I am trying to write using Visual C#, SQL Server
2005/2008, and Visual Studio 2008, and one part of it includes a Schema
called Client. Inside this schema, three tables exist named Country,
MedicalCondition, and Customer.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |