Combo Box Controlling Multiple Subforms

Apr 21, 2005

Hi,

I'm v.new to Access so do excuse my ignorance.
I have a form with a combo-box with the following values:
Trust, Course, Overseas, GP
When Trusts is selected I'ld like frmtrust_sub to appear.
When anything else is selected I'ld like frmnontrust_sub to appear
Once the data has been entered in the subform the user would continue back to the main form.
I'ld like the subforms to remain hidden until needed, if possible so as not to confuse users.

I’ve copied this piece of code and have tried pasting it into the “after update” event procedure but I get this error message

“the link masterfields property section has produced this error “Ambiguous name detected: Type_afterupdate”


Private Sub Type_AfterUpdate()

Option Compare Database

Sub ShowSubform()

'Save unsaved changes to currently open subform
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

'Display appropriate subform based on Type chosen
If Type = "Trust" Then
frmtrust_sub.Visible = True
frmnontrust_sub.Visible = False

ElseIf Type = "GP" Then
frmnontrust_sub.Visible = True
frmtrust_sub.Visible = False

ElseIf Type = "Course" Then
frmnontrust_sub.Visible = True
frmtrust_sub.Visible = False

ElseIf Type = "Overseas" Then
frmnontrust_sub.Visible = True
frmtrust_sub.Visible = False

ElseIf Type = "Other" Then
frmnontrust_sub.Visible = True
frmtrust_sub.Visible = False


End If

End Sub

Private Sub cmdClose_Click()

'Close form
DoCmd.Close

End Sub

Private Sub Form_Current()

'Call subroutine to display appropriate subform based on template type
ShowSubform

End Sub

Private Sub Type_AfterUpdate()

'Call subroutine to display appropriate subform based on template type
ShowSubform

End Sub


Any help would be greatly appreciated

thanks

Barry

View Replies


ADVERTISEMENT

Controlling Subforms With A Combo Box

Jun 29, 2005

Is it possible to control the data of a subform by making selection in a combo box?

View 2 Replies View Related

Controlling Forms And Subforms

Dec 10, 2006

Howdie y'all

I need a few pointers wrt the relationship between a form and its subform.

I have the following form:

http://i88.photobucket.com/albums/k193/bernmc/Misc/DefaultStaffingscreenshot.jpg

Top part of the form is for adding/editing etc.

The subform is based on a query. The two are linked on the 'week' value.

Now, this is what I want to do:

The user must not be able to edit data in the subform (so should I use a report instead... but then will I be able to do 2...).
Selecting a row in the subform should cause the whole form to go to that record so that the user can then modify info in the fields of the main form.

I don't know VB - the only code I've used is gleened from searching these forums (a great resource, so I'm learning slowly), so I'll need a bit more than 'Do a wrzmitchigob on the bleedlethrop'!

View 10 Replies View Related

Controlling Changes To Combo Box

Jan 17, 2007

I have a form. In it is a status field that can be:

NEW
SENT
CREDIT
COLLECT
CLOSED

When the item is created, it is given a "NEW" Status. And there is a command button on the form that can change the status to "SENT". However, based on external factors (email received or system report examined) the user can manually change the status to the CREDIT, COLLECT or CLOSED. Now, I want to make sure that then can't change the status manually to "SENT", only the system is allowed to do that via the command button.

How can I allow them to use some of the allowed values, but not others?

David

View 1 Replies View Related

Forms :: Combo Box Selection Controlling Checkbox Availability

Oct 6, 2014

I have a project database where I keep track of the work in progress on monthly bookkeeping for our clients. I have a form where I use a ComboBox to select the client and another ComboBox to select whether a sales tax report must be filed Monthly, Quarterly or Annually. I have 17 CheckBoxes one for every month, quarter and year-end. I want the selection in the sales tax reporting ComboBox to trigger which CheckBoxes are available to check.

That is, if "Monthly" is selected in the ComboBox, then only the 12 monthly CheckBoxes are available to check (the 4 quarterly and 1 year-end CheckBoxes will be disabled). If "Quarterly" is selected in the ComboBox then only the 4 quarterly CheckBoxes are available to check. Of course, "Annual" is the third option. The disabling of CheckBoxes must be on a record by record basis. "Monthly" could be selected for one client (one record) and "Quarterly" for another client (another record).

View 14 Replies View Related

Multiple Subforms

Jul 13, 2005

I have three subforms that i want to open optionally by using one open button after selecting the form that i want to open from a combo box.


or open the subform when the value in the combo box changes.

Please help

View 1 Replies View Related

Help - Combo Boxes And Subforms

Jan 15, 2008

Hi,

I have a form that is based on a query which looks up values in three different tables. I also have a subrform which looks up order information from the tables, all in the same form.

I need to have a combo box that includes the surnames of customers. When I select a customers surname, the customers booking information needs to appear in the subform and the customer information appears in the main form.

Does anyone know how to do this, preferably without code.

Thanks.

View 3 Replies View Related

Multiple SubForms - SQL Statement

Oct 5, 2005

I'm new to programing so if this is not possible please tell me! Because this is going to be hard to explain I attached an example.

I have a Main form that a user will open, this is the only window that will ever pop up in front of them so it has a subform that will open differnt froms by picking buttons on the left.

One of the sub forms is the Member Information form, this form will show member information than at the bottom has another subform that will allow a user to pick a button above it to open another subform (this is so member info is always show and a member can be registered, pay...all different subforms)

on the Event Register subform the "Class" pulldown is based on the event that was pick just above it.

Issue:
when I am in the main form, I can not get the class pulldown to work it always prompts me for "enter Parameter Value". I have tried the following SQL statements in the row source and noting work.. what am I missing???


SELECT SubCatList.SubCatName, SubCatList.EventName
FROM SubCatList
WHERE (((SubCatList.EventName)=[Forms].[MainFRM]![MemberInfoFRM].Form]![EventRegFRM].[Form]![EventName]));

and

SELECT SubCatList.SubCatName, SubCatList.EventName
FROM SubCatList
WHERE (((SubCatList.EventName)=[Forms]![MainFRM]![MainSubFRM]![Form]![memberinfoFRM]![MemberSubFRM].[Form].[EventName]));

View 3 Replies View Related

Creating Multiple Subforms

Nov 13, 2005

I am trying to add multiple subforms (or subtables?) on an existing form. The underlying table is a very detailed descriptive table for art in a collection, I am already using one subtable to manage the movement in and out of inventory. When I look at the table in the datasheet view, I see the "+" sign next to each record, and when I click on that, I see the subtable I already have setup - looking at that, it seems impossible to have more than one subtable... is this true? This does not seem right.

My question is this:
Can I have more than one subform in a given form? What I would like to have is a subform to keep track of provenance for any given piece (history of ownership), and another to track appraisals (values, dates, appraiser, etc) of any given piece in the collection.

Are there any samples of what I am trying to do?

View 1 Replies View Related

How To Add Values From Multiple Subforms

Jun 20, 2012

how to add times together from multiple subforms and display the data on the main form. Just for backround, I am creating a timesheet to be used by our workshop employees. The form is set up in such a way that there is a combo box where they can select their name which rotates the record so all the data is specific to their id, and then there is a tab box with a tab for each day of the week each containing its own subform with combo boxes to select the project they worked on, text boxes to enter the start time and stop time for that project, and then 2 other text boxes: one that calculates time worked on that particular project and then one that calculates the total time worked for the day since they typically work on more than one project in a day. So what I need to do is to take the values from the total daily hours boxes and add them all together and show the sum in a box showing the total hours worked for the week.

My most recent attempt was to simply make an expression in the control source as follows:

=[Sunday subform].[Form]![Daily Hours]+[Monday subform].[Form]![Daily Hours]+[Tuesday subform].[Form]![Daily Hours]+[Wednesday subform].[Form]![Daily Hours]+[Thursday subform].[Form]![Daily Hours]+[Friday subform].[Form]![Daily Hours]+[Saturday subform].[Form]![Daily Hours]

View 2 Replies View Related

Multilple Subforms & Combo Boxes

Jan 26, 2005

I am having trouble figuring out a combo box issue. I have frmSelection the holds two subforms: frmOrder & frmOrderDetail. Is there a way for me to make the forms work together so that a combo box selection in frmOrder affects the view in frmOrderDetail?

Example: If I select "Press 1" from combo box on subform frmOrder, can I get subform frmOrderDetail to show all of the entries for "Press 1"?

Thanks for your help!

View 1 Replies View Related

Sychronized Combo Boxes In Subforms (Help)

Jul 20, 2005

Hi,
I have created two combo boxes with the second box list being determined from what is selected in the first combo box. This works fine in a single form. The problem is however that when this from is then used as a subform the sync, will not work. Any advice.
cheers

View 3 Replies View Related

Display And Empower Multiple Subforms

Mar 27, 2006

Combo boxes cboTN and cboSB are on my main form. cboTN is a search combo box that updates combo box cboSB with one of 3 values (ID, IDC, or MC).

I would like to do the following:

1:
If the after-update value of cboSB is ID, subform sf1 will be visible.
If the after-update value of cboSB is IDC, subform sf2 will be visible.
If the after-update value of cboSB is MC, subform sf3 will be visible.
(only one subform visible at a time since they are stacked in one place on my main form)

2:
Once the appropriate subform is displayed, is it possible to use option buttons to set the property of the subform to either Add-only mode or Edit-only mode? If so, how? (perhaps some sort of Case A, Case B scenario with the option buttons?)

If you can help with either of the above; example codes would help my novice skills greatly!

View 10 Replies View Related

Tables :: Corresponding Data In Combo Boxes And Subforms?

Sep 27, 2013

I have a field showing who equipment is being distributed to pulling data from my US Employee table. If I make it to only the last name from my lookup

(SELECT [US Employees].[Last Name], [US Employees].[First Name], [US Employees].[Dept] FROM [US Employees] ORDER BY [Last Name], [First Name], [Dept])

I can also view the equipment listed under the individual it is assigned to on a subform on my US Employee table. If I try to have the first and last name displayed on my Equipment table, however,

(SELECT [US Employees].[Last Name]&", "& [US Employees].[First Name], [US Employees].[Dept] FROM [US Employees] ORDER BY [Last Name], [First Name], [Dept]; )

it will not display under the individual on the US Employee table. Is there a way around this without having to combine the fields on the employee table or separate them on the equipment table?

View 8 Replies View Related

Multiple Tables, One Form With 3 Subforms Problems

Dec 16, 2007

Hi Guys & Gals, I have an Access 2007 database that I am fighting with. I have a friend who needs a data entry database. So far I have created 4 tables: Cases, Customers, Data1, Data2.
Cases_tbl has following fields:ID(autonumber), Customers_ID(number), Data1_ID(number), Data2_ID(number).

The Customers, Data1 and Data2 Tables are all similiar, they all have the ID(autonumber) Field followed be fields that need data inputed.

I would like to have the Cases table as the master table that is linked to the other 3 tables, so when I delete a customer, there case, and all of there data is deleted with it.

I have one form with 3 subforms. Each subform is used for inputing data into the customer, data1, and data2 tables. However, I cannot for the life of me link all these tables together. I have tried all different relationships and have search the web high and low and I cannot find an answer anywhere. So if somebody could help I would be much appreciative.

View 11 Replies View Related

Forms :: Timesheet - Filtering Multiple Subforms

Sep 22, 2014

I have a form for timesheet entry that has 2 subforms.

The main form has a combo box for selecting staff name and another for WkEnding date. The form is based on table "SELECT StaffRef, WkEnding, Status FROM tTimesheets".

SubForm sfTimesheets is based on table tTimesheets. The subform is linked by StaffRef and WkEnding. (This has been working for ages.)

Recently added second subform sfOnCall based on table tOnCall. The subform is also linked by StaffRef and WkEnding.

If the user has a timesheet entry for the date, then sfOnCall displays and operates ok. But if there is no entry in the timesheet table, the sfOnCall form doesn't show the appropriate entry from the OnCall table.
-
I did try basing the main form on a UNION of the 2 tables, but whilst the query showed the correct data when I ran it - all the controls on the form disappeared!

View 3 Replies View Related

Modules & VBA :: Exporting Multiple Subforms Into One Subform

Aug 4, 2014

I've got a Main Form with :combobox "Name" that changes subform results

: Subform w/ container name "subform34"
: Subform w/ container name "subform35"
............................. "subform36"

I want to be able to do the following for each subform:

Me.subform34.SetFocus
DoCmd.GoToControl "Field1"
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand (acCmdCopy) ***

Except for starred line, I'm thinking I could save the records as Long, I don't really know.

Someone brought up the possibility of writing SQL to generate a query then export the query.. but don't know...

View 1 Replies View Related

Adding Data To Multiple Tables With Subforms

Mar 2, 2015

I am new to access but I am familiar with SQL databases. I have two tables: one for project data and another for project leader data. These tables are linked by a third table that relates projectIDs to leaderIDs. I am currently working on making a form that will go through each project and display the people involved in each project in a subform. I pulling the data from the the leader table that matches the the projectID with a query.

I would like to be able to update the information in this subform directly (which I can currently do) and be able to add new project leaders to a project. What is the best way to add the new leader to this? If a person is already in the database how do I add them with the form without re-adding new information to the table?

View 3 Replies View Related

Modules & VBA :: Cascading 3 Combo Boxes On 1 Form And 2 Subforms?

Dec 5, 2013

I have three nested forms that is Form3 is withing Form2 that is within Form1 (in reality = 1 Form and 2 subforms cascaded).

I want to select a value from Combo1, that will further brings the values in Form2, and then further filter the values in Form3. If the three combos were on the same form, I wouldn't have an issue. But since each combo is in every cascading form/subform, I dont know how to pass the filterning further to the other two combos.

View 6 Replies View Related

Forms :: Setting Sort Order On A Form With Multiple Subforms

Mar 4, 2014

I have a tabbed form. The main form is titles ContractDtlsFRM. There are 3 other subforms in separate tabs. The first field in the ContractDtlsFRM is Contract No. I would like the form to sort in ascending order by this number.

I tried entering the following code in the Forms Order By event but it didn't work

Private Sub Form_Open(Cancel As Integer)
Me.OrderByOn = True
Me.OrderBy = [Contract No]
End Sub

View 2 Replies View Related

Forms :: Main Form With Multiple Tabs - Sync Two Related Subforms

Jul 28, 2014

I have a main form with multpile tabs - each tab containing a different subform.

Link Master Field: ClientID (field in Master Form)
Link Child Field: Client ID (field in all subforms)

There is another field that all the subforms (continuous type) have: ObligorName. All the subforms are based off of a huge table (subtable) with fields: Obligor Name, Address, Zipcode, City, DOcuments Required, Bank Account Number, etc......

Essentially, the user will fill in the 10 obligor names associated to ONE client on the first subform on the first tab + address + zip code + city.

When the user clicks on the second tab to fill out the next subform, I want all 10 obligor names to be there already, so then they can fill out Documents Required + BAnk Account Number.

If I fill out the first subform and then exit out of the form and then reopen it, the other subforms autofill.

HOWEVER, I dont want to have the user have to do this. It wastes a lot of time. What can I do about this so that the table is automatically updated right away. They are all based on the same table so I do not see why there is so many issues.

View 14 Replies View Related

How To Link Subforms To Other Subforms On An Unbound Form

Feb 4, 2006

I forum could someone tell me:

I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links.

When I try to link them it says you cannot link items on an unbound form.

regards in advance
Peter:eek:

View 1 Replies View Related

Filtering Combo Box Based On A Value From Another Combo Box (in Multiple Items Form)

Mar 11, 2012

Let's assume we have 3 tables:

Order_Category (Order_Category_ID, Order_Type_Name) with 2 records:
1, Minor
2, Major

Order_Type (Order_Category_ID, Order_Type) with 4 records:
1, Book
1, Pencil
2, Car
2, House

Orders (Order_Category_ID, Order_Type, value) with 2 records:
1, NULL, NULL
1, NULL, NULL
2, NULL, NULL

I want to create a Multiple Items form presenting Orders table with two Combo Boxes:

1. A combo box to select Order_Category_ID.
2. A combo box to select Order_Type. When 1 (Minor) is chosen in the first combo box it should show Book and Pencil, when 2 (Major) is chosen it should show Car and House.

Examples in the Internet show how to do it on a 'single row' forms using the RowSource property. I tried to use a query like:

SELECT Order_Type
FROM Order_Type
INNER JOIN Orders ON Order_Type.Order_Category_ID = Orders.Order_Category_ID
WHERE Order_Category_ID = [comboBoxOrderCategoryID]

But it sets same values for all records in the Multiple Items form and it should return different values in each rows based on value in the first combo box (Order_Category_ID).

View 5 Replies View Related

Combo Box Multiple Colums As One Colum In Combo

Mar 28, 2006

Hello

I have had a look through the forum and I am not sure if this can be done. I have a table. i.e. with columns Decsription 1, Cost 1, Description 2, Cost 2 Description 3, Cost 3 description 4, cost 4 etc.

I am looking to try and gave a combo box show this information as follows. I.e

Colum 1 on Combo; Column 2 on Combo

Description 1 Cost 1
Description 2 Cost 2
Description 3 Cost 3
Description 4 Cost 4

I want to be able to auto fill some fields on a form based on the combo box selection.
Has anyone done this before and can it be done.

Thanks

View 1 Replies View Related

Updating Another DB And Controlling From A Differnt DB

Jun 16, 2005

Hello All,

How would I run a procedure in DB2 from DB1?

View 3 Replies View Related

Whats Controlling These Decimals?

Jan 5, 2007

Hello,

Dont understand what is controlling these decimals. I dont need any decimals for this database. The currency is talking bout money in 1000's and the probability is whole numbers.

Here is where I cant get the decimals to stop:

http://img80.imageshack.us/img80/3685/untitled2pl2.png
http://img77.imageshack.us/img77/6276/untitled3pa6.png
http://img208.imageshack.us/img208/2047/untitled3lk8.png

I have tried different things but no luck...anyone have any suggestions.

Thanks.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved