Tables :: Auto Populating A Table Field
May 30, 2013
I have the following tables:
Inquiry (This is the main table I want to populate through the use of a form)
Programs
My question refers to two columns in the Inquiry Table
Program
Group
The program column is populated by a drop down menu that is linked from a programname column in the Programs table.
I I want is the Group column in the Inquiry table to autopopulate based on the selected programname (There is a group column associated in the Programs table) so the form field will be autopopulated.
What I have tried is autopopulating the form (form name is Inquiries) Field called Group by using =[Program].[Column](1) in the source code of the text box. This works well, but it then does not populate the main table.
I need to either
- Learn how to populate the main table column called Group based on the form autopopulating
or
- Learn how to autopopulate the column Group in in the table so the form will autopopulate
View Replies
ADVERTISEMENT
Jun 27, 2014
I (will have) a form which a user fills in to enter new data.
I have two fields,
"Branch" and "Branch ID" (Branch ID will not be on the form, just in the table)
Branch will be fed by a combo box with seven choices. I would like it so that when "Branch" is populated it autopopulates Branch ID with a code which relates to the branch, so for example
BRANCH BRANCH ID
Braintree BRA
Colchester COL
View 4 Replies
View Related
Jul 16, 2012
I know auto-populating has been asked before for forms, but I am looking to auto-populate a couple of fields in a table based on an ID Number that corresponds to another table. I realize it is not the best practice to duplicate data in a DB, however, I am using an ID card program that requires tables to populate the ID card information. My hope is to have two separate tables for 2 versions of ID cards.
The first table is called Firefighter info with fields of ID Number, First Name, Last Name, and Firefight Certs, EMS Certs, and emergency contact information. The second table is called EMS Personnel with fields of ID Number, First Name, Last Name, EMS Certs, and other fields that will be entered manually. I would like the First Name, Last Name, and EMS Certs fields to auto-populate in the EMS Personnel table when the ID Number is entered. I have a relationship already listed between the two table that links the ID Numbers in both.
The Firefighter Info contains the information for all members of the department, regardless of whether they are EMS, or strictly firefighters. The EMS personnel table contains information strictly regarding to the EMS members. Thus, the ID number you are entering into the EMS table will always correspond to an existing entry in the Firefighter Info table.
View 6 Replies
View Related
Nov 23, 2012
I have 2 tables tblworkdone and tbltests, both have a date field and are both subforms in a tabbed form on the main form. When I enter a date into the tbltests subform I would like the date to automatically be entered into the tblworkdone date field and create a new record so that when I move to the tblworkdone subform with the date already there.
View 5 Replies
View Related
Feb 18, 2008
In case my other question cant be resolved, I'd like to do a work around, but dont know how to do that either.
So, I have a form (Photos) with a field (PhotoTitle) and in the form is a subform containing a continuous form a (Sales).
This form contains invoiceno, location, customer etc... but also PhotoTitle field.
I've been trying to get it to populate based on a relationship and use that data elsewhere, but cant, so I'd then like it to.. on enter (or focus) automatically populate with the value from the main form (photos), phototitle field and put it into the sales subform phototitle field.
What is the code for doing that?
Thanks!
View 9 Replies
View Related
Apr 19, 2006
Hi there,
I've been working on this issue for quite sometime. I've tried different methods, such as the DLookup function, but I think I'm doing something wrong. Let me explain what I'm trying to do:
This is a Work Order, the user will Select a Customer (Table Customer: Contains CustomerID and Customer Name, address, etc) from a drop down box. When they do this, I have another textbox which is designated for the Address. I would like the address to automatically populate. but its not quite working. I've tried it with the DLookup function (I entered it into the control source of the textbox). I entered the following syntax:
=DLookup("Address","Customer","CustID=" & cboCustId)
It keeps coming up with an error. I have no idea why.
Now this is just the first half. The second half I have a subform on the same main form, which lists the equipment they have on their site. The database has a number of customers with many equipment for each of them. How do I make sure that the subform only populates equipment associated with the Customer that was selected on the main form?
I hope someone is able to help me.
Thanks a lot!
View 3 Replies
View Related
Nov 20, 2013
I actually have two questions.
1. I was reviewing the Access 10 commandments and I wonder why using "lookup" is evil?
2. I am working on a db which contains approximately 14 tables. One is tblMaterialslist which contains the following fields:
ID - Autonumber
PartDescription - ShortText
PartCost - Currency
Size - ShortText
Additionally, I have a form in which I would like the "PartCost" field to auto populate when the "PartDescription" field is entered.
View 4 Replies
View Related
Jan 15, 2015
I am creating a database to keep up with the expenses for my art business. I have a table for Vendors with a field (Mileage) for one-way mileage that I enter manually (EX: 11.8 miles). Then I have a calculated field that basically just multiplies the Mileage field times two to get total mileage to and from my house to vendor location. (Total Miles) {The reason I want to do this this way right now is because I didn't keep up with my mileage this year and I am having to look up the distance from my home to each location)
Then I have a "supplies" table where I show the date, the vendor, the item, cost, etc, and I want to add a Total Mileage field based on the calculated Total Miles field in the Vendors table that will automatically populate based on the vendor of each transaction. I just can't remember how to make this work and I know just enough SQL to be dangerous.
View 2 Replies
View Related
Feb 28, 2013
Within my table if Field 1 has an answer of Self (from drop down), then, I would like Fields 6-12 to auto populate; however, if Field 1 does not have an answer of Self, then leave Fields 6-12 blank.
I am not quite sure how to lay this out. I am using Access 2010.
View 8 Replies
View Related
May 5, 2008
Sorry for posting into another thread about this, but here's my problem:
Hello All. Finally getting my pride out of the way and asking this. I've searched and this is the closest question pertaining to the problem I'm having. I have created a form to populate a table in Access. I've created Lookup fields for parts of the table that will get data from another table/tables. I want a certain part of the form to auto-populate data based off of the last name I put in the initial Drop-down box. Say, I have a person with a last name (and there are several with the same last names), I want the remainder of that line in the form/report to populate with his/her data needed for the form letter. Unfortunately right now, I have it where we have to select each from a drop down menu, for both last names, first names and other data needed. I've tore my brain up trying to figure out how to link the data in each one of the combo boxes to the first combo box. Any help would be appreciated. These are driving me nuts as I should be able to figure this out and it's just escaping my vision I guess. Thanks in advance for the help.
View 2 Replies
View Related
Sep 8, 2011
I am trying to create a form from questions listed in a table, add a yes/no column to it and then have it auto populate a data sheet with the question and the answer. how I can have the datasheet autopopulated?
View 1 Replies
View Related
Feb 15, 2015
I have a table ([AllNames]) that a field ([Past_Employers]) is being auto-populated, and I don't want it to.
[Past_Employers] population is setup form a form, which references a separate table of employer names [Employers].
If I enter a new record directly in the [AllNames] table the [Past_Employers] field populates.
[Past_Employers] is a multi-value field (yes ugh - I know!!!) and is not required.
View 4 Replies
View Related
Jul 29, 2015
Currently I have a form with these variables
- Assets
- Shifts
- Machine Offline Date
- Machine Offline Time
- Machine Online Date
- Machine Online Time
In the Asset Table I have recorded on each asset the number of shifts it operates for as well as starting / finishing time of those shift. e.g. 2 shift asset will start at 7:00AM finish at 11:00PM
or 3 shifts asset will start at 7:00AM finish at 6:59AM
Now I have 82 assets in the factory and 20% of those machines run 3 shifts. Each shift is 8 hrs.
What I have already done is allocate shifts per asset e.g.
when I pick Asset (a) in the Asset combo box, in the shift box it will automatically generate 2 or 3 dependant on what I have set.
If an asset runs for 2 shifts, it would mean that, that asset is operational/running from 0700 - 2300 or 7:00am - 11:PM
also if an asset runs for 3 shifts it would mean that, that asset is operational/running from 0700 - 0700 or 7:00AM - 7:00AM
These are the scenarios that is entered through a "Form"
Scenario A: Machine (a) breaks down at 1700/5:00PM on the 10/7/15 and was back online at 12:30 on 11/7/15, This machine runs for 3 shifts which would mean in the "Breakdown Downtime" the result should be 19.5 hrs
Scenario B: Machine (b) breaks down at 1900/7:00PM on the 10/7/15 and was back online at 10:00AM on 12/7/15, this machine runs for 2 shifts which would mean in the "Breakdown Downtime" the result would be 23 hrs.
I would like to make this an automatic calculation, Is this possible?
Please note I am not after a "Query", I need this calculation in the main Database table named "Tbl_MaintenanceDATA".
I understand this is not the norm and many have suggested against this, however for the purpose of what I need, it needs to be in the main table with all the other data.
Here are some snip it
snipit2.png
snipit.png
View 5 Replies
View Related
Aug 10, 2015
How to set up my tables as I'm just starting off with setting my database up.
I'm doing a simple database to track the purchase orders (PO) I am managing. Each PO has a PO Number and an Original Value. POs may have multiple amendments which would change the PO value. I would however like to keep the history of the PO original value and all different amendments.
So I created two tables:
tblPO:
ID
PO Number (Number)
PO Original Value (Currency)
PO Sum of Amendments (???????????)
PO Current Value (Calculated = PO Original - PO Sum of Amendments)
tblPOAmendments:
ID
PO (Lookup from tblPO)
PO Amended Value (Currency)
Amendment Date (Date/Time)
Amendment Desc (Text)
Now the two, million dollar questions are:
1.) Is this the right table structure to use.
2.) How do I go about calculating the Sum of Amendments field?
View 4 Replies
View Related
Apr 10, 2014
i have a user permission table.that consists of PermissionPK, UserFK, CompanyFK. I also want the username to be automatically filled in?So when a user ID is filled in on the table, it also fills in what that UserID's Username should be?As i need both the UserId and Username text for code that looks at the Environ username.
View 2 Replies
View Related
Aug 29, 2014
I Have a table with 15000 entries. This table lists components we use. This table is used to generate queries/forms. I have been asked to add a hyperlink to this table to link to a drawing of the component. All the drawings are in PDF and in the same folder. I am looking for a way to automatically update the hyperlink fields all at once. The Hyperlink will be in the format of servershareddrawings12345.pdfwhere 12345 is the component name from the table.
But there are a few small problems with the component names.
1. If the component begins with a B- . The drawing name will be all the characters except when there is a second dash in the component. So if the component is B-12345-678 the drawing name will only be B-12345.
2. If The component begins with AB, The drawing will be the first 5 characters regardless of what follows, e.g. AB123.
3. Finally for all other components the full component name will be the drawing name.
Putting the naming to one side, how to go about auto generating the hyperlink. I have posted this in the table section, but maybe this should be in another section like queries or VBA.
View 2 Replies
View Related
Sep 21, 2013
I have created quite a substantial and effective database for a small gliding club with all the major data tables being linked. I need to be able to re-index tables periodically so that running totals, which are needed to calculate statement balances, works correctly - all well and good. The only problem is that the process of re-indexing requires the data in the main table to be stored temporarily and the original data deleted. When the temporary data is appended to the main table the auto-numbering just keeps clocking up.how to reset the auto-numbering in a local table.
View 3 Replies
View Related
Sep 16, 2013
I have with my database. It's holds cost data including purchase made in foreign currencies which need to be converted to GBP using the correct exchange rate so a variety of reporting & stats can be performed.I have a table called Costs within which there are 2 fields
Purchase Currency
Exchange Rate
I also have another table called Exchange Rates 13/14 within which there are 2 fields
Currency
Exchange Rate
When a value is entered in the Purchase Currency field on the Costs table (this is a look up field linked to Exchange Rates 13/14 so it shows the listed currency in drop down) I need the database to automatically populate the Exchange Rate column in Costs i.e. match the value in the Purchase Currency field to the Currency field in Exchange Rate 13/14 and populate with corresponding Exchange Rate from Exchange Rate 13/14.I have tried the following and none work:
SQL Tried
1.
UPDATE Costs
SET ExchangeRate = [Exchange Rates 13/14].[Exchange Rate]
WHERE Costs.[Purchase Currency] LIKE [Exchange Rates 13/14].Currency
2.
UPDATE
Costs
SET
ExchangeRate = [Exchange Rate]
FROM
[Exchange Rates 13/14]
INNER JOIN
[Exchange Rates 13/14]
ON
Costs.[Purchase Currency] = [Exchange Rates 13/14].Currency
3.
SELECT [Exchange Rate]
FROM [Exchange Rates 13/14]
WHERE Costs.[Purchase Currency] LIKE [Exchange Rates 13/14].Currency
I know it is possible to have a drop down for Purchase Currency which shows 2 columns (both Currency and Exchange Rate) you can then use the exchange rate figure for a calculated field. The problem I have is that I am importing data into the costs table from excel. In Excel I can only have 1 value in the Purchase Currency column on the upload template. If I just have Euro in this column the database does not match it to the Euro in the Purchase Currency drop down and also store the correct exchange rate.
Or is the alternative to put this into the calculation of GBP Unit Cost where this somehow matches the Purchase Currency in the Costs table to the Currency field in Exchange Rates 13/14 tables and uses the appropriate exchange rate from Exchange Rates 13/14 to calculate GBP Unit Cost in Costs table.
View 4 Replies
View Related
Mar 29, 2013
I have a feed from ODBC to Access DB. I need to populate several new tables with the contents of the original table. I know I'm being stupid but it's been a long week.
View 1 Replies
View Related
Nov 16, 2013
i have made two tables with data from an excel sheet. The excel sheet has many duplicates and im trying to eliminate this. The tables are:
tblTasks and tblTeam. Both have autoincrementing primary keys, and the tblTasks table has the TeamID (primary key from tblTeam) as a foreign key.
My question is, how do i populate the TeamID field via perhaps a query, as it is blank on all records. I have over 5000 tasks so a manual approach is what im trying to avoid. A sample of the fields in the tables is as follows:
tblTasks
TaskID - PK
Task Name
Team ID - FK
tblTeam
TeamID - PK
Team Name
there's also a Staff table. tblTeam has a one to many relationship with the Staff table. tblTeam also has a one to many relationship with the tblTasks table.
View 3 Replies
View Related
Apr 12, 2013
I've got a working database with pretty good structure etc. How I would go about creating 3 prepopulated records on a many side of a relationship on entering a new record in the one side of the relationship.
View 6 Replies
View Related
Nov 23, 2012
I have created a database which has 9 tables, the first table being the contact information, but in all tables there are fields for firstname, lastname. Is there a way when you enter the firstname/lastname fields into the main table that it can populate the same information in to the same fields in the other tables? If so how?
View 5 Replies
View Related
Jun 9, 2014
I have created two tables. One table list of 100 Categories that I monitor each month. The Categories are never changing month-to month, however, each might be associated with a different client month-to-month. Presently, I am manually typing in the Client information month-to-month with information pulled from the Client's table. The Client's table has a Category Field which is populated when a Client has purchased space to use it.
In essence, I have the Category Table (Fields: Record Number; CategoryName; Client Name; beginning date the client will use the Category and Ending Date the client will stop using it). The Client's Table has a lot more fields/information but it still has the same fields as the Category Table. I am trying to be able to use the Category Table and have it automatically populate with the client who is using the Category at that time. Any Category not being used by a Client then the Query should write "Open" in the Client's name field. I have tried many different scenarios but can't seem to get it to work. I must see all 100 Categories each time I run a report. It doesn't have to say "Open" but where ever a client did not use the Category it should be left blank.
View 1 Replies
View Related
Nov 15, 2013
I have two tables, "Membership" and "Class." The Class table has a class ID, class name, and cost of the class.
In the Membership table, I have a field to accept a class ID that is entered by a user. I also have a column called Tuition. When the user enters a classID in the Membership table, I would like the dollar amount associated with that classID to automatically appear in the field called Tuition in the Membership table.
I tried the LOOKUP data type and calculated fields, but no luck. I know that DLOOKUP can be used on forms, but I don't see how it can be used directly with tables.
Is this even possible?
View 1 Replies
View Related
Apr 26, 2012
I have a combobox on my form with fields related to it (ie. when an option is chosen in the drop-down, the next two fields are also populated with data based on the selection made - I know this is duplication of data, it's just the way the 'powers that be' wanted it. I'm changing it in my next version of the database!)
The two fields that are populated as a result of the selection in the combobox are migrating into the related table fine, but the actual selection in the combobox isn't - it's showing up as blank in each new record in the table.
View 4 Replies
View Related
Sep 15, 2013
I've been trying to populate a field in a form with information, but only if the field is blank.
What I am trying to do is this.
I have a continuous form displaying all of our principals, however when our principals are on leave I want to populate the field with the "acting principal". I have set it up so the field grabs the acting principal first but it is blank for several schools. For these schools where there there is no "acting principal" I want it to grab the substantive principal automatically and populate the field.
I have tried Is Null, Is Not Null, NZ, IF, Where and Then statements but to no avail.
View 10 Replies
View Related