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

Subform trigger through a combo box selection

Hello Everyone,

I am looking for a way to trigger specific subforms to come up in a form through a combo box selection. For example purposes my selection in the combo box is CCP-03-081-FRM-14. The Subform is,"Area14".

I also have the combo box populating other fields in my form.

I am running Vista Home Premium with Access 2007.

Thanks for any info!
Jun 6 '07 #1
3 2365
Rabbit
12,516 Expert Mod 8TB
Hello Everyone,

I am looking for a way to trigger specific subforms to come up in a form through a combo box selection. For example purposes my selection in the combo box is CCP-03-081-FRM-14. The Subform is,"Area14".

I also have the combo box populating other fields in my form.

I am running Vista Home Premium with Access 2007.

Thanks for any info!
Use the after update event to change the subform control's SourceObject property.
Jun 6 '07 #2
Use the after update event to change the subform control's SourceObject property.
As the newbie that I am to doing this, can you give me an example of the code and if I use MACRO, EXPRESSION or CODE BUILDER.

Thanks for the input
Jun 6 '07 #3
Rabbit
12,516 Expert Mod 8TB
I use 03 so I don't know how well this code will work in 07, plus I haven't tested it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combobox1_AfterUpdate()
  2.    Select Case Combobox1
  3.       Case "Option1"
  4.          Me.SubformName.SourceObject = "Form1"
  5.       Case "Option2"
  6.          Me.SubformName.SourceObject = "Form2"
  7.    End Select
  8. End Sub
  9.  
Jun 6 '07 #4

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

Similar topics

4
by: CSDunn | last post by:
Hello, I have a combo box (Combo7) that needs to call a function during the After Update event of the combo box. The function resides in an Access 2000 ADP Module called MMAnswerData_code. The...
0
by: CSDunn | last post by:
Hello, In Access ADP's that connect to SQL Server databases, any time I have a situation where I have a combo box in a main form that looks up a record in a subform, the subform record source has...
1
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...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: NBruch | last post by:
Ok let me explain what im trying to do: i need a combo box which needs to be linked to a listbox (or combo box doesnt matter which really) then the listbox should bring up the record in a...
1
by: jerry.ranch | last post by:
So I've been playing with combo boxes and subforms. Finally, I can make a selection in a combo box, and have that drive an after update event to open a query or a form. Works famously. Now the...
18
by: Robert Jacobs | last post by:
Please advise... I currently have a Mainform (Customers) and a Subform (Service Requests) with a one to many relationship (one customer, many service requests) with a CustomerID that is unique...
6
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
5
by: JHite | last post by:
I’m using Access 2003 on Windows XP. I have a Mainform (Staff Entry) which displays an unbound combo box named ChooseStaff. The Row Source for this combo box is a SELECT of the UserIDs and Staffer...
1
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...
0
isladogs
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.