Add To Combo Box Table
Nov 29, 2004
I have a combo box on a form with a number of codes to select from. New codes are added on occasion.
If the data entry person types in a code that does not exist, I would like for them to be prompted and ask if they would like to add the code, then provide a form to do so. Any suggestions?
View Replies
ADVERTISEMENT
Nov 5, 2013
i have a table with three column Named
1-State
2-City
3-Customer
on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1
View 1 Replies
View Related
Nov 24, 2006
Ok my problem is this......
I have a form with a field "Property Status" on it. It has 4 possible values -
"C - SHELTERED (with warden charge)";"H - SHELTERED (No warden charge)";"J - WHEELCHAIR SHELTERED (With warden charge)";"M - WHEELCHAIR SHELTERED (No warden charge)";"X - DISCONNECTED"
When the value "X - DISCONNECTED" is selected in the form I want the record to be removed from its existing table and sent to a new table which keeps all the "X - DISCONNECTED" records together.
Any ideas would be greatly appreciated. How would this be coded?
View 1 Replies
View Related
Mar 29, 2013
I have a combo box (cboManifestNumber) that is based on the following table:
tblManifestData
ManifestDataIDPK (autonumber PK)
ManifestNumber
RemovedDate
ManifestComments
TsdfIDFK (FK frm tblTSDF)
This table is related to:
tblTSDF
TsdfIDPK (autonumber PK)
I need to be able to update tblManifestData with a new manifest number and manifest comments, along with assigning it a TSDF. how to be able to enter a new manifest number and the associated data without having it create two lines in tblManifestData. I thought that I could enter a new manifest number, then requery the table and form so it shows the complete list of manifest numbers (including the recently entered one) while staying on the newest entry.
View 2 Replies
View Related
Jul 11, 2013
I am trying to use a combo box to select the Company in an input record form for my Transactions. In the Transaction table, each record contains the Company ID, but not the company name (I have a relationship with a Company ID primary key in a separate table that has all the companies information).
I would like to be able to select the proper company in the combo box and have the form save the value as the Company ID number with the rest of the input data in a record (it will then refer to the correct company name in the other table if I query it because of the ID key).
View 3 Replies
View Related
Jan 17, 2014
I am trying to update a table with the value of a text box on the form where the table to update is as selected from a combo box on the form.I keep getting the following
Error message:
Run-time error 2465
Microsoft Access cant find the field & table_to_update & referred to in your expression..
But really can't see what I've done wrong. Have checked that the table_to_update string does contain the name of the table so guess it must be sql..
Code:
Private Sub Command91_Click()
Dim table_to_update, sql_string As String
table_to_update = Me.Combo49
Debug.Print table_to_update
sql_string = "UPDATE [" & table_to_update & "] SET [" & table_to_update & "].[Project] = """ & Text89.Value & """ WHERE [" & table_to_update & "].[ID] = " & Forms![T_entity]![" & table_to_update & "]![ID] & ""
db.Execute sql_string
End Sub
View 1 Replies
View Related
Aug 31, 2007
I am trying to build a Form that will show an estimate (then eventually will be moved to a project if customer and employee aggree to price and project) in a Form F_Estimates is a M_Customers(Customer_ID) (Based on a Table) and thier info in a Subform. Also is the "projected costs" from parts out of the Parts(Part_ID) (Based on another Table) in a second Subform as a list that I need to calculate $$$ in
(Dang that still sounds evil and definately NOT understandable even after edit... so)
Here's some basic info
Tables
EstimatesandParts - Table
EstimatesandParts_ID : Autonumber
Estimate_ID : Number
Part_ID : Number
Parts - Table
Part_ID : Autonumber
PartNumber : Text (not a number due to some part#s have letters in them)
PartName : Text
Unit Price : Currency
Description : Text
Estimates - Table
Estimate_ID : Autonumber
InvoiceNumber : Text (again can have letters in it)
EstimateDate : Date/Time
EstimateTime : Date/Time
Employee_ID : Number
Customer_ID : Number
ProblemDescription : Memo
Customers - Table
Customer_ID : Autonumber
FirstName : Text
LastName : Text
CompanyName : Text
Address : Text
City : Text
Province_State : Text
Postal_ZIPCode : Text (CDN Postal codes are letter num letter...)
you can see the link table in the EstimatesandParts Table
Now I want to use that link to populate a subform in the F_Estimates form
Forms
SF_Customers - SubForm
(all boxes atm are text boxes on this form till I figure out the Parts section then will use same base for this so I can pick any customer in the database to be the customer for this estimate. Also will have ctrl button for making new customer with customer form and a refresh on Focus Gain bit of code)
FirstName
LastName
CompanyName
Address
City
Province_State
Postal_ZIPCode
SF_Parts - SubForm
Default View -Continuous Forms
(want it to be a list of parts that I can grab prices and descriptions from then in a bit of code to calculate a cost of parts)
Part_ID : Combo Box
Control Source - Part_ID
Row Source Type - Table/Query
Row Source - SELECT Parts.Part_ID, Parts.PartNumber, Parts.PartName, Parts.UnitPrice, Parts.Description FROM Parts ORDER BY Parts.Description;
(Pulls info from the table Parts for input into a list of parts to be used on that project)
PartName : Text Box
UnitPrice : Text Box
(here's where I run into problems due to the fact that the form is not based on the parts table but rather the link table EstimatesandParts so I can't propogate the info to the 2 other text boxes, ps I dont care if they cant be text boxes and have to be linked or some other type I'm not "set" just need to find out how to make it work )
(have tried a couple things to complete this task)
Me.txtPartName = Me.Part_ID.Column(2)
Me.txtUnitPrice = Me.Part_ID.Column(3)
(works AWSOME ... for ONE ROW then propogates the second selection to the first and second and third selection to first second and third and so on ...)
(tried to make control source for the txtPartName to)
=Forms!Parts!Partname
(Doesnt exist .. akkk, cant use ActiveForm either as it doesn't focus on the SubForm but the MainForm ... cry)
F_Estimates - Form
Estimate_ID
InvioceNumber
EstimateDate
EstimateTime
ProblemDescription
(all basic Text Boxes)
Employee_ID
Customer_ID
(Combo Boxes Select Customer and Employee from list of present ones of each)
SF_Customers
SF_Parts
(Both SubForms on the main form)
Now this is an Exerp from my entire Database I like to work on one small problem at a time and I have made this its own little database till I figure out the problem then I will bring the info I learn back into the rest of the database and go from there ...
Hope you can help I have a feeling I will need to make a recordset and go from there but I'm just not able to wrap my head around that for some reason
Thanks in advance for ANY and ALL help that I get from here
View 10 Replies
View Related
Nov 19, 2007
I am still new to designing databases and have learned alot from this years database I built, in large part to reading these forums :D
On another Access site it stated, on a list of standard rules, that:
"Thou shalt never allow thy users to see or edit tables directly, but only through forms and thou shalt abhor the use of "Lookup Fields" which art the creation of the Evil One."
I'm concerned with the "lookup fields" part of this rule. Does this include using a combo box to choose the correct value for a field?
My current data base tracks work orders. Part of this is inputing the location of the work. The locations are all known sites that don't change. Currently I have a "Locations" table that I link to in my work order table via a combo box. On the form this combo box displays all the locations and I simply pick the correct one. I'm designing next years database and don't want to intorduce errors and bad design if it can be avoided now. I did some quick queries using the location combo box in a few different ways and had no errors or problems. Any thoughts or direction on this?
View 12 Replies
View Related
Oct 31, 2006
Hi Folks,
I was wondering if its possible to populate multiple fields of a TABLE with a COMBO BOX?
Please provide an example to understand.
Your Help in this regard is highly appreciated
Regards
Darno
View 4 Replies
View Related
Mar 3, 2005
I have a table that someone else set up and when I open the table in datasheet view there is one of the fields that has a combo box attached to it. I need to add a value to this drop down box. When I look at the table in design view I do not see anywhere to change the drop down box or even how it was added.
Thank you
View 2 Replies
View Related
Dec 21, 2004
I have one table (tblComplete) with a listing of 30-50 company names and associated information...
"tblComplete" has fields: AutoNumber, Company, Address, City, State, Zip, Phone
On a form I created a combo box linked to AutoNumber and Company to drop down the list. Once the 'company' is selected, I would like it and the rest of the fields (address, city, state, zip, and phone) to go into the blank table (tblSelected).
Could I use a Macro to do this or should it be a query?
View 9 Replies
View Related
Jul 31, 2005
I wonder if you can help. I am trying to make a combo box with peoples ID numbers in which links to a table with that persons details. I have made the combo box with the names in but now trying to link the table to it.
For example: Fred is in the combo box with ID number 1 and the user selects him and wants to see his details about him after clicking continue. The form has autonumber 1 showing Fred's details after clcking this.
Any help
Cheers
John :cool:
View 2 Replies
View Related
Dec 7, 2005
I want to create a combo box that links direct to a table, rather than going through a query. Then when you select the record from the list it updates a text field to show the memo field of which the selected reccord is related
Can any one help
I tried using a query to do it, however queries only ever allow a maximum of 255 charcacters in the fields
basically the code looked like this
cboAfterUpdate()
me.txtfield = me.cboselection.column(1) ' because the data was in the seccond column
end sub
but as you can guess this only allows 255 characters to come accross from the memo field
View 1 Replies
View Related
Jun 13, 2006
I am very new to Microsoft Access and I needed some help. I added a combo box to a form and I want the value in that combo box to appear in a table. I was wondering if anyone knew the correct code to do this. I would really appreciate some help. Thank You.
View 5 Replies
View Related
Jun 28, 2006
Hi.. i have a combo1(InvoiceNo) that look up the values in a table, (there are invoices numbers on it) In the Invoices table i have InvoiceNo (that is the key) and other fields like InvoiceCity, SaleDate, etc
I need to store the current date in Invoices.SaleDate = now() in Invoices table that matches with the combo1.
The Form has as RecordSource, Customers Table
Any tip or hint???
View 1 Replies
View Related
Jul 7, 2006
I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.
(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)
View 1 Replies
View Related
Jul 7, 2006
I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.
(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)
View 3 Replies
View Related
Sep 19, 2004
I have managed to get one combo box on a form (Categories) to look up the approprate values for that category and populate another combo box, i.e. if I choose Premesis costs in the categories combo box, I am given the relevant choices in the Details combo box, eg. rent, cleaning...
Now this is all great but I want the values I select in BOTH boxes to be entered into the underlying table. I have tried putting the relevant field as the control source, but the way it is set up means that only numbers are put into the table. Here is the code and stuff (I got this from a help site, so I have changed my table and control name to theirs to make life a bit easier):
cboStore (i.e. the Categories)
Row Source: SELECT tblStore.lngStoreID, tblStore.strStoreName FROM tblStore;
Event - AfterUpdate:
Private Sub cboStore_AfterUpdate()
Dim sManagerSource As String
sManagerSource = "SELECT [tblManager].[lngManagerID], [tblManager].[lngStoreID], [tblManager].[strManagerName] " & _
"FROM tblManager " & _
"WHERE [lngStoreID] = " & Me.cboStore.Value
Me.cboManager.RowSource = sManagerSource
Me.cboManager.Requery
End Sub
Private Sub Label5_Click()
DoCmd.OpenQuery "qryCategories", , acReadOnly
End Sub
cboManager (i.e. Details)
Row Source: SELECT tblManager.lngManagerID, tblManager.lngStoreID, tblManager.strManagerName FROM tblManager;
The Tables:
tblStore: Field names: ingStoreID (Autonumber); strStoreName (text)
tblManager: Field Names: ingManagerID (Autonumber); ingStoreID (Number); strManagerName (text)
The Query (very simple):
qryCategories: strManagerName From tblManager; strStoreName from tblStore.
Phew! Is that enough info for someone to help me? I wouldn't mind even the numbers being in the table if there was some way that I could change them back to text for a report.
I'd be really greatful if someone out there could help - be gentle with me though, as I'm note very good at this code thing!
View 2 Replies
View Related
Jun 23, 2005
I have a table that has 2 fields. One field referes to data in another (using combo box pointing to a DEPARTMENT table). When a value is selected I want the next field to only choose the values that refer to that department sub classifacations. In other words.
If I have 3 departments and 5 job classifacationd in each department. When I select a department I only want the choice of the 5 job classifactions to be listed.
I have the DEPARTMENT table and the JOB CLASSIFACATION tables linked correctly. If you look at the DEPARTMENT table you see the + isign on the left and if you select the + sign you can see all the JOB CLASSIFACATIONS listed.
My problem is that I can get the DEPARTMENT column to list the departments, but when you choose one and go to the JOB CLASSIFACATIONS I either see all 15 job classifactions or a text box asking me for the department, or nothing at all.
I was able to create a Form to do this, but I can't figuer out how to put this in a table so that I can make it useful and link it to an employee.
I have wasted too much time and am in over my head. Need some real help.
Thanks very much,
Ricko
View 5 Replies
View Related
Apr 14, 2015
I Would Like to Look up SQL server 2005 table as Tbl1 to my access combo box as combo 1...Total 2 columns in the SQL table as Item & Qty.
View 5 Replies
View Related
Aug 9, 2014
So instead of having all of my data on a single table which is filtered out as I make selections in my initial 3 combo boxes, I'd like for each set of data to be on it's own table. Instead of filtering out the irrelevant data in a single table, I'd like the initial 3 combo boxes to instead filter out the irrelevant tables. My main reasoning for doing this is that I figure it would first off save me much trouble in the future when editing data within the tables and also that one huge data table would slow down Access eventually.
View 9 Replies
View Related
Dec 1, 2011
I have two tables, one with a list of accounts (ACC), the other to post data about the accounts (DATA). I created a form for DATA and a combo box to select the account it relates to.
In the DATA split form, the account name shows up correctly in the datasheet. But when I select the DATA table, the ID of the account name shows up instead. How do I get the table to look the same as the datasheet in the split form?
View 5 Replies
View Related
Jun 16, 2014
I am back with another question about Access 2010. I would like to filter a table by using a combo box.
I have several columns in the table, and I would like to filter them by their departments (there are several users in each department)
I have tried using the combo box wizard and select " I would like to search records based on the values in combo box" but the problem is that the department shows up as many times as it is in that table.
I came across another solution which was to create an unbound combo box and link it with the query. and the department criteria would be the following:
[Form]![NameOfTheForm]![NameOfTheCombobox]
but it did not work either.
View 1 Replies
View Related
Jan 20, 2005
I have a VB6 form that I want to fill with data from a field in an Access DB. I get the connection and the first field, but want the whole column to show up as the combo box items so that one can be selected, then when saved, populate and/or update another Access table. Can anyone help me cause the whole column to display instead of only the first record? TIA--Ed
View 1 Replies
View Related
Feb 17, 2005
I have created a combo box with the values I need from a table. Once I select the correct record from the drop down box I'd like to be able to open the table with just that one record being displayed. Thanks for your help.
View 3 Replies
View Related
Mar 14, 2005
Checked the FAQ on this but doesn't apply to what I need.
Basically, I have a Product Class, and Products that are in the class. My database is for a computer component business, so the clsses are Processors, Mainboard etc.. and the products that fit into that class. The Class and products are listed in the Products table, and I need a way to have it on my subform, so I can choose the product class from one combo box, and then have another combo box to view the products in that class.
Right now I have it :
SELECT DISTINCT Products.[Product Number], Products.[Product Description] FROM Products
and that lets me select ALL the items in my products list, but I also have a Product Class Combo in the form that does nothing yet - So I thought adding :
WHERE (((Products.Product Class)=(!FORMS![Orders Subform1]![Product Class])) ORDER BY Products.Product Class
To the end would sort it, but it doesn't and gives me the error : "Syntax Error (Missing Operator) in query expression"
What am I doing wrong?
Cheers,
James.
View 1 Replies
View Related