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 1703
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.tblServiceType FROM table table.tblService HAVING (((table.tblService)=forms!frmMain!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.
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_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!Combo24
strSQL = strSQL & " from Categories"
Me!Combo46.RowSourceType = "Table/Query"
Me!Combo46.RowSource = 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!Combo24;
Then in after update of Combo 24 put
Private Sub Combo24_AfterUpdate()
Me!Combo46.Requery
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.acsol.net
-
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
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
So here I go again, on a different database. I have a form and subform where I input client names and the employers that they work for, frmClientJob and frmClientJobs Subform. I have a dropdown box called Employer that pulls the employer name from tblEmployer, the I have a table tblEmployerJobs where I have what jobs each employer has. I want the Employer dropdown to only have the jobs that go to the employer that is picked from the employer dropdown. Last time I did this in the other database, I had seperated the info to different tables, then had it show just the info in the specific table.I can not do that here, because the table information changes. Can you help me?
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...
|
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.
...
|
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...
|
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")...
|
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 ,...
|
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...
|
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...
|
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,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |