Update Queries Vs Append Queries, Indexes?
Aug 7, 2007
This is a very simple problem most likely for the masses, but I am new to access. I have employees who enter will enter information about specific tests on electronics components into separate tables by a form. I know my method is poor, but this is how it works. I got assigned this database at my internship this summer because they ran out of thigns for me to do.....I've never even used access before, so as long as it works, they're happy. I have a form which which writes to a first table with 20 fields. I then have separate update queries which take the data in the first table and put it in all the other tables. Trust me, i know this is pretty much the opposite of the whole point of a relational database, but I am and was limited by time, for the size of the database they want, there was no time to learn about normalization etc etc. Sorry this is wordy, but THE QUESTION is......if they run multiple tests wtih the same information for some of the fields I have fields named "Run#, Unit#, Date" etc, even if there is records wtih the same information, hwo do i get it all to show. Right now, it seems to be rewriting over the same records. If they run 3 tests on unit 10 on August 1st, how do i get it so all those show up. I think its somethign wtih in the table, for the primary keys, changing the Index: No, Yes(Duplicates) Yes(No Duplicates) but I could be way off. Thanks, if the question doesnt make sense i'll try to rephrase it, I apologize I'm running on about 45 min of sleep:confused:
View Replies
ADVERTISEMENT
Sep 19, 2005
Just wondering if someone can point me in the right direction so that i can solve my problem?
Basically what i have is a select query that carries out some calculations based on data entered. These calculations are expressions as i am sure you guys know. what i want to do is put the value from the expression/calculation into my table in the correct fields made for these values. However i have tried everything i can think of to get this data into the tables fields but to no avail.
example. Expr1: [field1]*[field2] the answer created by [Expr1] is the value i want to be placed in [field3]
Can anyone help me on how i can do this
View 4 Replies
View Related
Sep 4, 2005
I am accessing an oracle database that has several thousand records in it. I am quering for specific requirements, but would like to save my query results in a local access database for faster searching capabilities. Is there a way for me to set up a query that will go out to my oracle table files, select the records that pertain to my search criteria, and add records to locally stored tables without duplicating itself each time that I run the query? I would appreciate any assistance in this matter. Thanks for your help!
View 1 Replies
View Related
Jul 25, 2015
I am using a DB to, among other things, calculate the monthly salary of my service users. Obviously, I have to do it every moth. Most of the data from the previous month will be the same in the next month, except date. Even if some of it is different, having the previous data on sight calculate the new salaries.
Every month I have to select all records with the month date (say 07/2015) I want to copy and
(1) copy paste the records into the salaries table, and
(2) search and replace the new records' dates.
For example, records with 07/2015 with say 08/2015 (I have to replace downwards to ensure I don't change the record of the month I need to keep).
It can't be that difficult, but I have tried append and update queries to make this automatically (say by clicking a button) but so far no luck.
View 10 Replies
View Related
Mar 28, 2008
Hi,
I'm hoping someone might be able to help point in the right direction. Our IT department applied a patch update to windows 2000 overnight, which has had an impact on the Append queries in my DB.
Basically I have a number of append queries that use lookup tables to append the appropriate data from the underlaying table to the required table. They all have a relationship of "only include rows where the join fields from both tables are equal".
These were all working fine yesterday, but this morning, even though there is data in the underlaying table that meets the criteria, not data is being identified.
Has anyone any idea, as our IT department don't know and are not prepared to undo the patch update.
Your assistance would be most appreciated.
John
View 1 Replies
View Related
Aug 6, 2013
In access Im working with two tables, this is my setup
tableA.documentnr
tableA.revison
tableB.documentnr
tableB.revision
Both tables are filled with data, Table B contains the same kind of data as table A, But tableA has documentnumbers with different revisions (for example revision a,b,c, for each revision a seperate row). Table B might have an identical document, but just one revision (like revision a).
Now I like to append the data of tableA to tableB, except if a revision is similiar to a revision in table A. (There is more metadata involved, but I will do it step by step)
Im not working with primarykey data, becayse in the end result table B will also have multiple (identical)document numbers with different revisions on different rows.
I tried to use the update query but it doenst append the documentnumbers where the revision is not present in table B I attached a image of the tables.
View 9 Replies
View Related
Nov 7, 2013
is possible to run an Append Query and update a field at the sametime?
i.e. I would like the MealDate field to be incremented by 1, just not sure how to write the code within the query!!!
This is what I have so far!!! not working
MealDate: ([MealDate](Date()+1))
View 5 Replies
View Related
Jun 5, 2013
I have two tables "TABLEA" and "TEMP"
fields in both tables are
Cust ID (Primary key)
Cust Name
Address
Cheque No
Amount
Location
Zone
I need query when i click on command button on form
if "Cust ID" which is primary key in "TEMP" Table match with "Cust ID" from "TABLEA"
It will update the record in "TABLEA" if not then append the record
View 1 Replies
View Related
Feb 25, 2014
I am giving two tables and I need to create a macro that automatically updates these tables depending on the value of a Yes/No field. If it's No, it's in the 1st table TableOne, if it's Yes it automatically updates to TableTwo.
So, the best way I saw to go about is to set up an append query and then create a macro that runs it
So my tables have the values FirstName, LastName and isValid (more but keeping it short)
So for my append query, I put TableTwo in the pop up I get. Then, where it asks for the field I put it
Field:FirstName
Table:TableOne
AppendTo:[TableTwo].[FirstName]
Criteria:[TableOne].[isValid] = 1
I do this for all (it was autocompleted except the Criteria field). I tried to keep Criteria with data only for isValid but that didn't work. I wrote it for all the field names, still didn't work. Whenever I click run it says it'll append 0 rows.
View 5 Replies
View Related
Nov 18, 2014
I'm using Microsoft Access 2010. I want to create a database that people without Microsoft Access can use. If I create a database is it possible to use VBA in Excel to update a table in Access and then run/export a query? I know you can use Excel to communicate with MS Access but can you do it when you don't have MS Access installed on your computer?
I have daily sales data that I want someone without MS Access to be able to load into the database and then export a query from.
View 2 Replies
View Related
Jul 12, 2013
I have an append query and want only the last row (Unique ID) to be added rather than the whole table. Is it do-able? Here is the SQL...
INSERT INTO TblCoursesRebooked ( StaffCourseID, Course, [Date], Staff, [Renewal Date] )
SELECT TblStaffCourse.StaffCourseID, TblStaffCourse.Course, TblStaffCourse.Date, TblStaffCourse.Staff, IIf(IsNull([Renewal in Years]),Null,DateAdd("yyyy",[Renewal in Years],[Date])) AS [Renewal Date]
FROM TblStaffCourse INNER JOIN (QryCourses INNER JOIN TblCourse ON QryCourses.CourseID = TblCourse.CourseID) ON TblStaffCourse.Course = QryCourses.[Course & Level]
GROUP BY TblStaffCourse.StaffCourseID, TblStaffCourse.Course, TblStaffCourse.Date, TblStaffCourse.Staff, IIf(IsNull([Renewal in Years]),Null,DateAdd("yyyy",[Renewal in Years],[Date]))
ORDER BY TblStaffCourse.StaffCourseID DESC;
View 4 Replies
View Related
Sep 23, 2007
I got these two append and delete queries in my database that i want to run on startup. I was wondering if there is a way to not have the msg that pops up to ask if you are sure you want to append/delete 0 record to table if there isn't any record that matches the condition set. I'm sure there is a way because if there isn't any record that matches the condition set in the queries then i don't want to have to click "No" everytime the database starts.
thanks,
Vincent
View 14 Replies
View Related
Nov 11, 2004
I have a table that I want to append to another table, but I do not want to duplicate records if the check number is already in the table I am appending to. I have tried
<>[deposit].[check_number]
or
not like [deposit].[check_number]
or
not [deposit].[check_number]
but I always get prompted to enter a check number... therefore the criteria statement not working.
do not know what I am doing wrong.
View 5 Replies
View Related
Apr 11, 2007
Hi,
I have a macro that runs a 'make table' query followed by a series of 'append queries' each time the macro is called. I require the data from each append query to be pasted below the existing data already created by the original make table query and the append queries that have already run. The issue that I am having is that the data in fact appears to be appended in an unpredictable way (ie sometimes I run the macro and find that data from the append queries is below the data from the make table query, at other times I run the macro and find that data from the append queries appears above the data from the make table query. Unfortunately, this causes problems with downstream queries, which rely upon finding the last row of data subject to various filters. Can anyone help me understand how Access determines the sorting/positioning of new data appended to an existing table, and therefore resolve this issue?
Thanks in advance,
jc
View 3 Replies
View Related
Oct 10, 2007
I've done some searching, and haven't found any threads that match what I am attempting...
I have a database that tracks expenses that are incurred under different ongoing projects. I currently have a report based on a query that asks the user for the project number, and shows all the expense invoices that have not been paid for that project. This report is basically an internal invoice that gets assigned to a department, and so it is assigned an internal "invoice" number. Currently, the user types in this internal number before the report is generated and it is displayed on the report for printing purposes.
Here's the tricky part (for me anyways): I would like to be able to filter the invoice records by project number, and then append the user-entered internal invoice number to the applicable records. There is already a field in the table for this data, and it is currently being entered on individual records after the report is printed. My goal is to be able to do this all in one step.
Any help will be greatly appreciated... Thanks guys!
View 14 Replies
View Related
Feb 14, 2014
I am having fun with key violations and cant seem to find out why?
I basically am deleting a Job but when i delete it i want to archive it hence the 'Archive' query and the History Tables.
It seems to be pasting everything in fine apart from the 'EmpJobHistory' Table?
I am getting the usual message "Key violations"?
I think i need the intermediate 'EmpJobHistory' Table because there will be Employees that are related to many Jobs and vice versa.
View 9 Replies
View Related
Feb 26, 2014
I am trying to copy notes from one table to another table where a condition has to be met and I can't figure out how to do that in an APPEND query.
Each record has a unique number that comes into my Initial Table in my Access database from a construction program I download. In this particular table both the [DNJTNo] and [DNVersionNmbr] fields can have duplicate numbers. However, when I run the query I want it to add a record to the second table only after the query checks that the [DNJTNo] in combination with the [DNVersionNmbr], is not already in the table. If it is, I do NOT want it appended to the second table. (I have attached a picture of the query in APPEND design stage).
View 2 Replies
View Related
Apr 20, 2015
I have a table called dbo.userinfo with a primary key called employeeid and a field named jobfunction.
i have an intermediate table named dbo.projectpositions with a primary key named projnumber and a foreign key named employeeid.
I have a 3rd table named projects with a primary key projnumber and a field called project manager.
I'm trying to append the Projects table so that any projects that a worker has worked on (dbo.projectpositions) that is listed as a project manager (jobfunction) will have their employeeid fill in the project manager field on the projects table. Looks something like this:
INSERT INTO Projects ( [Project Manager] )
SELECT dbo_UserInfo.JobFunction
FROM (dbo_UserInfo INNER JOIN dbo_ProjectPositions ON dbo_UserInfo.EmployeeID = dbo_ProjectPositions.EmployeeID) INNER JOIN Projects ON dbo_ProjectPositions.ProjNumber = Projects.ProjNumber
WHERE (((dbo_UserInfo.JobFunction)="Project Manager"));
But just can't figure out the next step to populate the project manager field...
View 2 Replies
View Related
Aug 15, 2013
How can I modify the below code so that it only adds new records to AttributesTBL from ProductInformation-Consumer?
INSERT INTO AttributesTBL ( Material )
SELECT [ProductInformation-Consumer].Material
FROM AttributesTBL INNER JOIN [ProductInformation-Consumer] ON AttributesTBL.Material = [ProductInformation-Consumer].Material;
View 2 Replies
View Related
Jun 10, 2014
I have a table with 3 fields:
numberFROM, numberTO, Quantity
e.g.:
10, 15, 6
I would execute an append query that will store in another table:
10
11
12
13
14
15
How could I mange it?
View 14 Replies
View Related
Jul 25, 2013
I basically want to use a set list (TableAddresses). This would be a Append Like "*InsertAddress*" I do this manually by simply typing 20 different addresses and then clicking Append.
Is there a better way to do this simply?
View 1 Replies
View Related
Apr 27, 2014
I am having problems adding details from StudentForm to student table. When I click on the add student button it throws back an error Microsoft Access cant append all the records in the append query.I have attached the error as a pdf and the database for info.
View 2 Replies
View Related
Apr 19, 2013
I have a form(frmNewTest) that generates a fitness test id when you enter the month and year (you do not need to enter anything in the Fitness test id field which is greyed out).
This data on the form should then append to the tblFitnessTest. However, when I select the button to add test it returns a message 0 rows to append.I have attached the database and the form in question (frmNewTest). There are two append queries attached to the button on the form and neither work correctly. I have tried almost everything but can't get it to work.
View 4 Replies
View Related
Jul 2, 2015
I have a list of dates in my Form1.
When I click on a date it opens Form2 to show that dates specific details.
I would like a macro on Form2 that appends the filtered results to another table.
I think I am just struggling with the references to Form2 in the append query criteria.
View 1 Replies
View Related
Jul 30, 2013
I would like to use an append query that appends data from a union query into a table, but doesn't add duplicates based on a certain field.
I have been trying to use this code, but it doesnt seem to work.
INSERT INTO [Cotton13/14]
SELECT DISTINCT [Contracted Farmers].*
FROM [Contracted Farmers]
WHERE NOT (SELECT * FROM [Cotton13/14] FROM [Cotton13/14] AS [Cotton13/14] WHERE [Cotton13/14].[OF Codec] = [Contracted Farmers].[OF Codec])
Cotton13/14 is the table I want to append to and Contracted Farmers is the union query. However the code is giving me an error.
View 7 Replies
View Related
Jul 7, 2014
I am looking to make an invoicing database.
I create 30 invoices a month. each client gets billed the same amount each month (for example Customer A gets billed $100 every month, Customer B gets charged $200 each month). Only two things get changed on the invoice-'Description' (for example the description would be 'services rendered for July 2014' for July invoice) and 'Invoice Date'.
Now please see the image attached, I have an append query that combines information and creates invoices for all 30 clients.
The problem is, the 'Invoice No' field in the invoice table stays empty, because I do not know how to start numbering at a specific point (for example invoice numbering should start at 14150001) and I want it to add the number (+1) automatically when this append query adds data to the invoice table.
View 13 Replies
View Related