473,569 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo Box in subform help needed

4 New Member
I am having trouble populating a combo box in a subform. Currently I have two combo boxes on a single form that works. This is my current setup:

Table:Facilitie s -
FacilityID ... FacilityType
1 ............ Bus
2 ............ Library

Table: Additional
DetailID .... Details .............. FacilityID
1 ..............T Imetable .......... Bus
2 ..............S heltered ........... Bus
3 .............. Opening hours ... Library
4 ............. Borrowing ........... Library

The form is saved in a third table called "Saved"
Table: Saved
SavedID .... FacilityID .... DetailID

The saved table takes the combo box inputs. Table:Facility and Table:Additiona l are linked via FacilityID column. Basically if I click on Bus in combo box 1 it populates combo box 2 with Timetable and Sheltered, which I then choose one of them.

This is done with an after update event in combo box 1:

Option Compare Database

Private Sub Facility_AfterU pdate()
Details = Null
Details.Requery
Details = Me.Details.Item Data(0)
End Sub

Private Sub Form_Current()
Details.Requery
End Sub

Private Sub Form_Load()
If IsNull(Facility ) Then
Facility = Me.Facility.Ite mData(0)
Call Facility_AfterU pdate
End If
End Sub

Combo box 2 has the selection code:

SELECT Additional.Deta ilID, Additional.Deta ils, Additional.Faci lityID FROM Additional WHERE (((Additional.F acilityID)=Form s!Saved!Facilit y)) ORDER BY Additional.Deta ils;

What I would like to do is move combo box 2 into a subform and add another field to describe what the details mean. I don't know what coding chages I have to make or even if I need another table to store the new information.
Nov 26 '06 #1
2 1898
PEB
1,418 Recognized Expert Top Contributor
Simply you need to change the references to the field Details including the path like:

MyForm!Control. Form![Detail]
Nov 27 '06 #2
docsix
4 New Member
Anyone have an idea or a downloadable example of how to fix this problem?
Dec 9 '06 #3

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

Similar topics

1
3457
by: Donna Sabol | last post by:
I have a form (frm_MAIN_RPT) that contains a combo box (Combo6) & subform (dbo_REQ_subform). The combo box is used to select the "cost center" data that will be displayed in the subform. From there, I have a button that runs a report based on which item I select in the subform. 1. The Combo Box correctly displays the list of cost centers...
1
2959
by: BigJay | last post by:
I am 1. trying to have a combobox used as a selector to display records in a subform. and not sure on how to get selected info into subform.the combo is populated but can not get subform updated when selection is made..... 2. I also want to use one combo box to select a second set of criteria in a second combo box that is then used to...
0
2061
by: cognoscento | last post by:
I'm currently putting together a database for my work (not an expert by any stretch, so muddling through as best as I can... you know the story...) and I could use some advice and hand-holding I've got a subform with a series of cascading combo boxes (thanks to the Access tutorials on fontstuff.com) that let the user assign categories to...
1
1671
by: UrKo | last post by:
Hi all, First let m say that i did search and found lots of answers to my problem and have solved it partial. I have a main form that include subform. I needed to get the data from combo box to be shown in textfield in a (continuous) subform. Found the solution: IDCode.column(mynumber)
1
3093
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form Main...
4
3020
by: Swinky | last post by:
I am trying to make a combo box dependent on a text box. I cannot get the combo box to pull the related data from the text box. I have been all over this user group & have tried several versions of code to no avail. I would like to display all contact names (in the combo box) related to the customer number in the text box. Here's what...
6
3669
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
1
2165
by: dvorasnell | last post by:
Hello, I have a fairly simple database. In this dbase, there is a subform which basically holds menu values for the records. These values serve as the "notes" for each record. OK, I find that I am typing a rather long string in many "notes" section of the subform. Rather than have to type this over and over again, I would like to automate...
5
4889
by: samdev | last post by:
I have created two combo boxes in a subform.... For example 1. Combo Box State 2. Combo Box City 3. When a state from the Combo Box State is selected, the City combo box updates to reflect the State chosen by only showing cities in that selected state. 4. When I open just the subform it works just fine but when I open the
0
7698
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, 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...
0
7924
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, 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. ...
0
8122
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
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...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
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...

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.