I have a main form containing client details (tbl_Client) and a sub form containing notes (tbl_notes). tbl_Notes contains a foreign key field (Client_ID) which is obviously the primary key in tbl_Client.
The client is chosen on the main form using a combo box where the user selects the clients name. the id is not visable to the user. How can i get it so that the id (Client_ID) of the selected user is inserted into the Client_ID field of tbl_notes.
In my database I have a table that keeps track of a package of items. The package is assigned a package type (counter display, end cap, half pallet, full pallet for example). The record of the association of the package and it's type is held in the main table.
Each of these package types is either a case or a pallet (counter display and end cap are cases and half and full pallets are pallets) This relationship is kept in another table (we will call it description table).
Now, based on the type of package and therefore it being a case or pallet a UPC and a GTIN number are assigned. The GTIN number is different if it is a case or is a pallet. I have a table that stores all of the UPC and GTIN numbers available in 3 columns, one for UPC, one for GTIN Case and one for GTIN Pallet (the UPC is a standard 12 digit and the GTINs are 14 digit -with the first 2 different to designate pallet or case. and all are based on the check digit formula necessary)
The user assigns the UPC and correct GTIN number by clicking a button which applies the next available UPC code to the package and determines if the description of the type (case or pallet) and inserts correct GTIN number into that field. I actually have all of this functioning correctly.
Now the problem. If a user changes the package type, and therefore changes the description, I need to add code to the update event of the combo box that gives the choices for package type that does the following:
Check to see if the original package type was a case or pallet (it's description) and if by changing the package type it is now changed to the other, update the record in the main table to the correct GTIN number based on the existing UPC Code.
OR as I write this, maybe the code could simply update the main table with the correct GTIN code based on the new description and the existing UPC code. This was I would not need to check for a change just do the update every time.
I would like to run a simple select query, where the CRITERIA is based on the user choice. I have a form with a combo box, with a few choices, and a button that will trigger a macro with one query for now. I can store the choice in to a variable e.g. "town", using Microsoft VB code. How can I transfer the variable to the CRITERIA field in the query, so whenever I chose a specific "town", my query will select the records for that specific town. I want to use one query, and I don't want to have to "hard type the criteria in to the cells' query", but I would like to use a variable that can change and will be read it from the user choice through combo box.
I used a combo box to let user select "Proejct Status" such as active, completed, cancled. I want to set active as a default selection if user does not choose other status. How can I do that? Thank you very much for your help.
i have a two column that one stores a professions and other stores a number of the profession like that:
number professions
1 singer
2 police man
3 teacher
"number" column is a combo box, that boundColumn property is two.
i want that in the form when i choose a value in a combo box i will see the profession in other text box in my form.if i choose 2 in combo box i see in a other text box in my form police man.
Hi I have been searching this forum for 3 hours for a solution, some come close others are pure gobble de gook to me. I have on a form 1 combobox where a name is chosen, from that choice I would like the address, suburb, state etc automatically placed intheir relevant fields. I have tried =DLookUp("[PropertyAddress]","tblProperty","[Property]") in the address textbox which will only bring up the first recod's address from the table, if I change the name in the combobox the address doesn't change. What am I doing wrong, I have designing databases in Access for a total of 7 days now and have been going fairly well with some tips and code snippets from this forum but this has got me stumped.
I am trying to show an image on a form based on a user choice from a drop down box. For example, the user needs to choose a priority for a task. If the user chooses "Immediate" I want an image of an exclamation point to show up to draw attention that this is important.
I have a table called Contacts and a form with two combo boxes for searching for records either by name or property name. The following code works fine for finding the first record, but I want to be able to show on the form all (and only) those records which match the combo box entry. Currently rowsource for name box is: ************************************************** * SELECT [Last Name1] FROM Contacts UNION SELECT [Last Name2] FROM Contacts ORDER BY Contacts.[Last Name1]; ************************************************** * and code is: ************************************************** * Private Sub Combo214_AfterUpdate() ' Find the record that matches the control for Last Name search Dim rs As DAO.Recordset
Set rs = Me.Recordset.Clone rs.FindFirst "[Last Name1]= '" & Me.[Combo214] & "' OR [Last Name2]= '" & Me.[Combo214] & "'" rs.FindNext "[Last Name1]= '" & Me.[Combo214] & "' OR [Last Name2]= '" & Me.[Combo214] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark Combo214.Value = "" txtFirstName1.SetFocus End Sub ************************************************** * Rowsource for property box is: ************************************************** * SELECT Contacts.PropertyID, Contacts.PropertyName FROM Contacts ORDER BY Contacts.PropertyName; ************************************************** * and code is: ************************************************** * Private Sub Combo212_AfterUpdate() ' Find the record that matches the control for Property Name search Dim rs As dao.Recordset
Set rs = Me.Recordset.Clone rs.FindFirst "[PropertyID] = " & Str(Nz(Me![Combo212], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark Combo212.Value = "" cboPropertyName.SetFocus End Sub ************************************************** **
Hello, I have a combo box called (cboridge) bound to a table called (Ridge)with two fields/columns called (dollar amount) (Material type)with 4 different options/records, when the user selects his option/field the dollar amount shows stays visible in the (cboridge) combo box Then I have a text box called (txtridgetot) that has a calculation in it, but I need different calculations per option/field that's picked. Can each option/record that is chosen have a different calculation associated with it in the (txtridgetot) text box.
In other words if the user selects the third option/field called shake ridge could I have a calculation that would run and have it display the sum of this calculation in the text box (txtridgetot).
Hello, I have a combo box called (cboridge) bound to a table called (Ridge)with two fields/columns called (dollar amount) (Material type)with 4 different options/records, when the user selects his option/field the dollar amount shows stays visible in the (cboridge) combo box Then I have a text box called (txtridgetot) that has a calculation in it, but I need different calculations per option/field that's picked. Can each option/record that is chosen have a different calculation associated with it in the (txtridgetot) text box.
In other words if the user selects the third option/field called shake ridge could I have a calculation that would run and have it display the sum of this calculation in the text box (txtridgetot).
If so could you please describe how?
Thanks-- Any help will be greatly appreciated.http://forums.aspfree.com/newthread.php?do=newthread&f=18# Hello!
Per the instructions detailed here... http://www.fontstuff.com/access/acctut08.htm
...I created a parameter query in the form of a drop down box that, once an option is selected, should display a form with a number of fields pre-filled from a record chosen by the drop-down selection.
The drop down has a command button with the following code in the Onclick event:
Private Sub cmdCreateReport_Click() DoCmd.OpenQuery "qryUIRFollowUp", acViewNormal, acEdit DoCmd.Close acForm, "frmOpenUIRLookUp"
As it now stands when I click the button I get the form but none of the selected data is filled in. The fields are blank.
What code to I need to add to the above to make the form hold the data selected from the drop down?
I have a Table with 57 fields. I would like to display this table in a form as a subform, but only certain fields depending on what selection is made in a combo box.
For instance, if the user selects "Missing Information" in the Combo Box, then the form will show a few standard fields such as ID, Market, Sales Manager, and then some specific ones such as date missing information requested and date missing information received.
If the user selects another option, again the standard fields will remain plus a few different ones.
I have done much searching on this and feel like I am so close but so far. I have looked into controlling the record source of the subform, columhidden =false and a multitude of others. All of which may or in fact probably do work in this situation but I can't seem to put it all together.
I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.
The variables are 'Payment in 30 days" " Payment upfront"
if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date if "payment upfront" is selected the field on the form will enter todays date.
This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.
I've tried a few different ways to enter this but i can't quite get it to work as i want.
i have attached a document with print screen of the form and combo box properties i am working on
the way it works is, when the user selects a code, the appropriate desciption, uoi and price is displayed. but for some reason the price combo value is not being written to the price field in the table. all the data on the form except for item desc and uoi is written to tbl_waste. the item info for the combo boxes comes from qry_items.
please help..i have been banging my head for days now...thanks
Just fumbling my way around Access 2007, is the only way you can create a drop down list of number by creating a table and inserting a combo box? I am trying to create a list of hours for example:
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done 2)If it can be done, how can I do it?
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry Africa Zambia Africa Congo Africa South africa Europe England Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.
I would really just like the text box to work like this, but im still kinda inexperienced in VBA...
If combo box is "F004-001", then text box is "237" If combo box is "F004-003", then text box is "280"
I know how to add in an "after update" thing, but i do not know how to do If/then statements.
I'm have quite a difficult time getting a form in Access 2010 to perform the way I would like it to. I have multiple tables that I've created, and a query that contains the data from the various tables. I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.
What I want to do: 1. I want users to be able to select a category in combo box #1 (example: "Bag") 2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the following selections for combo box #2: "sandwich" and "tool") 3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"
I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.
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).
I would like to set up rules/constraints such that the value selected in combo box A determines the available values in combo box B. For example, "Combo box A" is bound to the [PartnerType] field and "Combo box B" is bound to the [PartnerRole] field. Let's say that the two choices in Combo Box A are "LLC", "LP", and "Corporation". There are 5 possible choices in Combo Box B: "X", "Y", "Z", "Q", and "U". If a user selects "LP" in Combo Box A, I would like Combo Box B to only show choices "X" and "Y". And if a user selects "LLC", only choices "Y", "Z", "Q", and "U".
Similarly, I would like to set this up so that Combo Box B is not initially visible--it becomes visible when a user selects "LLC" or "LP". If a user selected "Corporation", Combo Box B would remain hidden.
It's been a while since I've used Access, and I seem to have forgotten this.
I have a form which allows entry of Borrower's details. I have 2 combo boxes on the form.
They are:
cboBorrName cboLoanSN
Once the user selects the name from the cboBorrName, I want the cboLoanSN to display all loans associated with the Borrower so that they can select the correct loan and add repayment details accordingly.
I have added the following SQL statement as the record source of cboLoanSN
Code:SELECT * from tblBorrower WHERE tblBorrower.fldLoanSN=[Forms]![frmBorrower]![cboBorrName]
I have also added the following code in the After Update event of cboBorrName
I'm trying to build a database for daily work. My work in daily basis I have to fill all condition for several items.
We have two areas, with two locations under each area, and three systems under each location and each system contain more than 500 items.
I created all tables and fill by all information:
1-Table 1: Area 1, Area 2, Area 3, Area 4, Area 5, Area 6. 2-Table 2: Location 1, Location 2. 3-Table 3: System 1, System 2, System 3. 4-Table 4: all items under System 1-1-1 5-Table 4: all items under System 1-1-2
[Code] ....
Last table will be LogBook which will be as follow:
date l time l area l location l system l item l Conition1 l Conition2 l Conition3
My question regarding to the form of the above table:
How can I make a combo box for area field and when I select for example area1 will appear only the locations which under area1 in location field, and when I select location1 for example will appear only the systems under location1 in system field, and when I select system1 one for example will appear only items under system 1.Combo box list will be based on the selection in previous combo box and so on.