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.
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.
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.
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.
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.
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!
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.
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.
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.
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.
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 ?
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...
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.
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
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.
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?
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.
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
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
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?
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.
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:
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)