Combo Box In Subform Problem

Aug 15, 2005

I am trying to add a combo box to a subform with problems related to selection of the listed fields.

More specifically, I have created a form, subform and a combo box in the subform all based on separate queries similar to a sample database on this forum which seems to work. The combo box properties are as follows

Control Source is an Autonumber field
Row source is a query
Column count is set to 2
Column Widths are 0cm;3.5cm
Bound Column is Column 1

Despite these settings being similar to the sample database, when I try and select an option in the combo box I get a message saying "control cannot be uodated as linked to an autonumber field".

I have tried imitating the forum sample databe and have changed various things including the bound column to 2 but then I have separate problems where the selection I made in the combo box is repeated in the next field in the subform.

I hope this makes some sense. I have attached a sample of my database (db2) and a sample database taken from the forum which appears to work as I would like mine to.

Many Thanxs in advance for any help

View Replies


ADVERTISEMENT

Forms :: Filtering A Combo Box On A Subform From A Combo Box On A Main Form

Apr 27, 2013

I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:

Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;

The subform is called Stock Subform witha combo box called ProductID with the following:

Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName;
Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

[code]..

The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.

View 11 Replies View Related

Forms :: Get Subform To Requery After Choosing A Name From Combo Box On Subform Itself

Jul 26, 2013

All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"

I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup. I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work.

View 14 Replies View Related

General :: Subform Combo Box Restricted By Form Combo Box

Mar 28, 2014

I'm an Access newbie and I'm having trouble restricting a combo box on a subform based on the selection of the combo box on the form.The combo box (Combo1) on the main form (FrmOrganisation) gives a list of companies, I want the combo box (Combo2) in the subform (SbFrmEmployees) to list people only from that company. I then have a subform within that subform that displays information about the employee.

View 3 Replies View Related

Combo To Filter Subform From Another Subform?

Feb 2, 2015

Main form frmSiteDetails

frmRooms (subform) holds Room information for the rooms on each floor. This form has LinkMasterField [SlaveFloorsID] and LinkChildFields [FloorsID]

frmFloors subform holds floor information for each floor in a property. This form has LinkMaster [SiteID] and LinkChildFields [SiteID]

Both these forms sit on a Tab Control (TabCtl57) and do work properly.

What I would like to do is to also have a Combo to pick a floor number from frmFloors and filter frmRooms. Both these forms have FloorsID fields. This would save a user having to go back to frmFloors to pick a different floor and then go back to frmRooms to view the room data for the new chosen floor.

View 2 Replies View Related

Combo Box Within Subform

Sep 18, 2006

hi, i have a combo box in a subform.

the value of the combo box is depanding on the main form.

i want the list in the combo box can be displayed but the value of the combo box must not to be edited.

how i can do this? cann't use combo1.enable = false as the list has to be displayed. please help.

View 2 Replies View Related

Combo Box/Subform

Apr 6, 2005

I have created a main form containing information on classes that I conduct. On this main form I also have a subform containing student information related to the class. Within the subform there is a combo box that contains student’s license number, when this number is selected from the combo box all fields in the subform are automatically populated. When I enter a license number that is not in the db the NotInList function opens the students form, information is entered into the students form then closed returning to the subform. However the fields in the subform are not automatically populated. This is my first post I hope I have attached a copy of the database.



Please help! I have been reading and working for a solution for a Long….Long…….Long………Time.



Thanks

Mike

View 2 Replies View Related

Combo Box Not Working In Subform

Mar 3, 2005

I have a main form which is linked through a [PackageID] field to a subform. i wast to use the same form for both shipments in and out. the subform has a list of serial numbers add for each [package id].

On the main form i have addresses ect and then a combo box onthe [PackageID] field which brings up all the serial numbers that came in, in that package.

This is perfect for sending a large container back out unopened, however there are times when the database will need to 'pick and choose' serial no.s from several packages. To do this i made the [SerialNo] field on the subform a combo box - looking up all the serial no.s in stock - however when a serial no is selected it doesn't update the other 15 fields in the subform.

Any sugestions? Got a feeling thats its quite an easy thing to do but its beaten me!

Many thanks

Ed

View 2 Replies View Related

Subform / Combo Query

Apr 27, 2005

Hi Folks

Attached is an example of what I'm looking to do.. I'm new to VB code and not great on queries either.

I'm looking to simply choose the department from the dropdown combo box on the form and the subform above it to update with showing all the results containing the department from the selection.

Not sure on the best way to do this, either via a query or from the table directly, or even some way to use the drop down to filter the table being displayed on the subform.

Anyone got any ideas. Thanks

View 2 Replies View Related

SubForm Combo Box Requery

Jun 24, 2005

I am a newbie to access and am having some difficulty with a subform. I have searched the forum, but could not find an exact match to my problem.

The following is a simplified version of my problem:

Tables: TSerialNumber, TLocation, TSubLocation(Location and SubLocation Fields)

Form: ServiceForm
SubForm: ServiceSubForm
Form and SubForm linked by SerialNumber

In the SubForm: I have 2 ComboBoxes: Location, SubLocation
Location - Row Source is the Table TLocation
SubLocation - Row Source is a Query of SubLocation relating to the Location

I need the SubLocation field to be requeried OnChange from the Location ComboBox.

If I use the subform as a form I can get this to work by using a macro to requery the SubLocation, but when I try to use it as a subform I get an ApplyFilter Error.

Thanks in advance for any help.

View 3 Replies View Related

Bounding A Subform To A Combo Box

Dec 4, 2005

hi

im trying to create a form that has something of the following structure

the main parent form has customer details which is straight forward

the main form also has a combo box which contains the name of a supplier

the first subform has supplier details so that when i click on the above combo and select a supplier their details come up in here.

now i also have a second subform on the main form which tells me the orders that this customer will make this shows me all the orders the customer made relevent to the above suppliers products

i know the above sounds like a strange implementation - i dont know if its been done already but i was hoping someone could point me the right direction for a correct implementation to do this.

many thanks

View 1 Replies View Related

SubForm Based On Combo

Dec 11, 2005

Hello,

Having Trouble with a Form, Currently the Form is Setup so Data Results can Be Stored, with a Combo Box to Enter a Result RED/Amber/Green. when the Result is Amber or Red, there is a Subform on the Right were People Need to Enter a Value ie the Reason for the Red/Amber. This all Works Fine, However People have a Habit of Not Entering the Values on the Sub Form. I carnt Find a Way to Make the Subform Demand Data if the Value on the Main form is Red/Amber.

Any One have a Idea on the way to do, i.e is there a Property I am Missing or Do i Need to Change the Form so that the Subform Lauches after Update based on result ?

Thanks for Looking

View 3 Replies View Related

Filter A Subform Using A Combo Box

Mar 9, 2006

I have a form with a combo box on it.

I want to use the combo box to query a subform.

So basically when you click on the record in the combo box it will filter the subform based on the selection.

Is there is a simple way or do I need to be more specific about the requirements ?

Any help would be greatly appreciated.

Domble

View 2 Replies View Related

Help With Combo Box In Continuous Subform!!

Sep 28, 2006

hi guys i have a main form called Passengers coming from tblPassengers table and then it has a subform to select the destinations for each passenger.

My subform (continuous) consist of entering up to 3 destinations for each passenger so i created a combo box with this row source:

SELECT DestinationID, Destination FROM tluDestination
WHERE DestinationID NOT IN(SELECT DestinationID FROM tblDestinations WHERE PassengerID = Forms!formname!txtPassengerID);

The reason is that i want that when the user enters a destination, when they go to select another one , the selected one is excluded from the list. but it does not happen... can someone help me with this , i am going nutss
i attached the db to see if anyone can help...

View 5 Replies View Related

Update Subform With Combo Box...arg

Oct 18, 2006

This is so simple but I can't seem to make it work. I've poured through about 30 posts and tried all kinds of AfterUpdate event strings to no avail. Help!

Here is the simple setup. I have one table that lists employees and their corresponding teamleader. A grouped query provides the record source for a combo box. The idea here is that you select a teamleader from the combo box and a subform updates to show all the corresponding employees. This subform is based on a simple query of all fields on the table.

combo box = cboteamleader
mainform = frmTechMaintenance
subform = frmEmployees

I've finally settled on this...


Private Sub cboteamleader_AfterUpdate()

Me!frmEmployees.Requery

End Sub


...as having the greatest chance of success based on other posts. Not sure why it doesn't work. It just doesn't update.

View 6 Replies View Related

Subform Combo Box Requery

Dec 28, 2006

I have a subform that contains two combo boxes, 'cboPrimary_Source' and 'cboSecondary_Source'. When you select the primary source e.g. 'Direct Mail' a number of related options appear for selection in the secondary source combo box e.g. Letter, Email, Fax. When you open the subform only, this works just fine using the requery.

However, when you open the main form 'Prospects' where the subform sits it does not work. The primary source combo can be selected, but when you select the secondary source combo an error message appears 'Enter parameter value: Forms!Subdatasheet_Subform!cboPrimary_Source'.

The code used on the Subdatasheet_Subform is as follows:

Option Compare Database

Private Sub cboPrimary_Source_AfterUpdate()
Me!CBOSecondary_Source.Requery
Me!CBOSecondary_Source.SetFocus
End Sub

Private Sub Form_AfterUpdate()
Me!CBOSecondary_Source.Requery
End Sub

Private Sub Form_Current()
Me!CBOSecondary_Source.Requery
End Sub

Any suggestions would be gratefully received!

View 8 Replies View Related

(Yet Another) Subform/Combo Box Issue ..

Jan 2, 2007

An Access newbie, and I have searched the forum and found hundreds of related posts but none of those helped.

Here's the issue -
1 . I have a form with a text box and database navigation button to pick the "Frequency" from tblFrequency.
2. The subform(datasheet view) displays the records from another table related to the "Frequency" shown in the textbox.

The table relationships are set up and the above set up works perfectly fine. Just that I would like a Combo Box to replace the text box and database navigation button in the main form.

I can create a combo box that successfully retrieves frequencies from tblFrequency and I enter the field names in the Link child/master fields. But then the selection in the combo box has absolutely no affect on the records in the subform.

I am using Access 2000. Any ideas?

Thanks in advance,
rr

View 7 Replies View Related

Update Subform Using A Combo-box

Jan 19, 2005

Hi,
I am trying to update a subform by selecting a record in a combo-box that corresponds to a particular test when i select the said test i want an adjacent subform to change to the form displaying the test data in the subform window i have tried to use VBA to achieve this but so far have been unsucessful does anybody know how this can be done?

Regards
Gavin Cleary

View 1 Replies View Related

Combo Box Update Subform

Mar 23, 2006

I want to limit the values in a subform using a combo box. Basically I've got a Main Form that has name field etc. Selecting a different record shows me a different entry on the subform relating to a different name but now I want to use a combo box to limit what I see in the sub form another level. Any help would be wonderful.

View 1 Replies View Related

Forms :: Combo Box In A Subform

Aug 29, 2014

I have a form with a sub-form. I have tried to use combo box in the subform but on selection of the items, they replicate to all rows available. How do i use combo box in a sub-form

View 1 Replies View Related

Linking Two Combo-boxes Within A Subform

Mar 13, 2005

I'm creating a database to assist with the sales operations of a hat shop. I have a form for creating new orders called 'Invoice' where the order number and date is set.
Within this form is a subform called 'Invoice_Order' (Continuous layout), this form is used for assigning order items to an order number.
Within the subform there are two combo boxes which search the Stock table.

1st ComboBox- diplays hat styles (E.g- v1/v2/v3/v4...)

Problem is; different hat styles are available in different colours based on the material used. I would like the second CoboBox to display a list of colours depending on the style of hat chosen.
At present i can only get it to display a list of colours for all hat styles.

Does that make sense?
Any help would be most appreciated

View 4 Replies View Related

Won't Update: Subform Linked By Combo

Apr 6, 2005

I have a form that I have linked (master/child) to a combo box on my main form. I have a requery command for the subform set to the "After Update" event on the combo box. When the combo box is updated originally, the subform updates. However, if the combo box is updated after having a value, the subform does not update.

First off, is the requery command even the right command to use to update the subform? (it's source object is a table) Second, is there a reason it wouldn't work if that is the correct command?

Any ideas?

View 2 Replies View Related

Subform Or Combo? - Locked & Unlocked

Jun 29, 2005

I have a combobox that:

1. When adding a new record, I want the user to be able to select any value from the combo box. I then have 3 other fields that automatically fill themselves in. I set their sources to [combobox].Column(x), 'x' being their resepective column in the combobox.

2. When the user is simply looking at a record and not adding a new one, I want the combobox (and, therefore, all 4 fields) to be locked to prevent accidental changing, etc.

First of all, I know that comboboxes should be avoided, if possible - I would like to use a subform (I think) if I can, but I don't know how to do it. What steps would I need to take to implement a subform for this process.

Secondly, whether I use a combobox or a subform, is it possible to have records locked when the user is only "viewing" them and unlocked when they need to add a record? Otherwise, whatever the default values are for those 4 fields will remain for that record since the user cannot change them. Hopefully, this makes sense. Any improvements to my idea would be appreciated.

I have installed a checkbox next to the combobox. After the user selects an option from the combobox, they can check the checkbox to "lock record." I know its a bit primitive, so to speak, but I think it will serve its purpose. If they ever need to change the record, they can uncheck the checkbox and proceed if necessary.

This will work, but it is not ideal obviously. Once the user enters that data, it most likely will never change. Something more permanent would be more desirable.

View 4 Replies View Related

Filter Subform Based On Combo Box

Dec 13, 2005

Hello everyone!

I think I am asking the impossible, but can't think why it can't be done!

Here's the dilema:

I am working with an unbound form to search a Mobile Register.

On the form I have an unbound combo box which looks up User details from a table (LKP_User).

When I select a user, I want the subform below to filter all the details for that user and show me which mobiles they have.

PROBLEM:
Combo Box has 3 fields, User_ID, User, Dept_ID. User_ID is bound column but not displayed in combo (only User) is displayed.

I need to link the User_ID with the User_ID on the subform, but don't know how to tell it to look at column 1 of the combo box.

Can anyone point me in the right direction? Do I need some fancy code to get this to work?

Cheers in anticipation
NKA

View 6 Replies View Related

Combo Box Subform 'Reverse Lookup?'

Jun 9, 2006

I have two tables A and B. There is a 1 to many relationship between A and B. Table A's data is controlled by FormA, Table B's data is controlled by FormB which is a subform on FormA. I already have a combo box for navigation on FormA, however I would also like to be able to have a combo box on FormB (FormA's subform) for navigation, so that when I choose an record from the subforms (FormB) combo box, FormA then jumps to the 1 record from FormA that contains the related record choosen in the SubFormB's combo box (along with the subforms choosen record on the subform) .

Kindalike the combo box on FormA, except it's a 'reverse lookup' if that makes sense. Is this at all possible, does this even make sense? :confused:

_______________
HOLY CRAP BATMAN!!!

View 2 Replies View Related

Find A Record Combo On A Subform

Sep 11, 2006

Hi all,

I have a form for accounts, which has a subform listing the customers within each account.

On the customers form I can use the wizard to add a combo to find a record, but if I want to add a similar combo within the subform, the option does not appear in the combo wizard.

Can anyone enlighten me on why/how to resolve?

Many thanks

Mark

(using Access 2003 on an Access 2000 format db, Win XP Pro SP1)

View 1 Replies View Related







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