[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

DBCombobox selection

Posted on 1999-11-30
2
Medium Priority
?
188 Views
Last Modified: 2013-12-25
I have two DBComboboxs

I have one for the building and the other for the room of the building

I want the second DBcombo to view only the rooms that is in that building

How?
0
Comment
Question by:jaik113099
2 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2243154
On selection from the first combobox, you need to set a filter for the query which builds your second combobox and rebind the second one.

If your queries are something like

"select BuildingName from Buildings"
And
"Select RoomName From Rooms Where Building = '" & dbcombobox1.text & "'"

you would put the second in the click event of the first combobox and then
dbcombobox2.rebind

Will update the second combo.
0
 

Accepted Solution

by:
mohdsunil earned 180 total points
ID: 2243562

use to data controls named data1 and data2.
data1.recordsource=Building
data2.recordsourec=Rooms

dbcombo1.rowsource=data1
        .listfield=Building
dbcombo2.rowsource=data2
         .listfield=RoomName



now in the data1 reposition()vent give the code;
data2.recordsource="Select RoomName From Rooms Where Building = '" & dbcombobox1.text & "'"

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question