Selective Update Queries
Jan 12, 2006
Happy New Year Everybody
Can Anyone help me with this please
I have a Employee Table with the following columns
EmpID
Name
Address
Telephone
PostCode
Spending
What I want to do is to update the spending column, for eg. I have the following data in spending
1233
1555
1665
I want to set the last 2 digits of the figure to '00'?
Can anybody tell me how to do this please!! I am desparate for it!
THanks
Si
View Replies
ADVERTISEMENT
Jan 12, 2006
Happy New Year Everybody
Can Anyone help me with this please
I have a Employee Table with the following columns
EmpID
Name
Address
Telephone
PostCode
Spending
What I want to do is to update the spending column, for eg. I have the following data in spending
1233
1555
1665
I want to set the last 2 digits of the figure to '00'?
Can anybody tell me how to do this please!! I am desparate for it!
THanks
Si
View 3 Replies
View Related
Jul 6, 2005
I'm working on an inventory database for video tapes. Each tape has a Catagory, Sub-title, Sub-Sub-Title, Professor, Location, and Format. What I'd like is to be able to do is select a catagory from a lookup, and only the sub-titles related to that catagory appear in the sub-title lookup, not all sub-titles in the database. Following suit, I'd like the sub-title I select to bring up a limited list of sub-sub titles. I'd like a lot of things with this database. Unfortunately I have no clue how to go about doing this, which doesn't help me much. I've tried six different ways so far of attacking this, and nothing works (I've been at it for about a week). Does anyone have any suggestions, solutions, reccomendations, whatever? Any help would be appreciated. Thank you in advance.
View 1 Replies
View Related
Dec 1, 2005
Hi All,
I've created a table that take the results of a questionaire, with
0 = No
1 = Yes
2 = N/A
For each question I want to count the number of Yes, No and N/A in one query. I can get the result for one question by using Count with the critera set to = 0 or =1 or =2, but can't do it for multiple questions in one query and I don't really want to create 33 query for each answer and then join them.
I have attached the table that I'm using cos I'm not usually very good at explaining things.
Thank You
View 8 Replies
View Related
Apr 7, 2007
I have a query that has the follwing fields:
Gross Payment :Currancy
Tax Discount: Boolean (Yes/No)
I want to create a new field called Tax Deducted that if the tax discount is no, the Tax deducted = Gross Payment * (22/100) but if tax discount is yes, then Tax Deducted = 0.
I'm not sure if i'm supposed to do this in a query or in a report but that's what i need to do. I ask if anyone can tell me what i need to do so that i end up with something like this:
Person A £29000 Yes 0
Person B £10000 No 2200
View 2 Replies
View Related
Sep 24, 2007
Good afternoon,
I am trying to figure out how to create a cumulative sum field for a test report I am working on. On a very simple level, I can run queries to get my data into the following format:
Test # | Article # | Test Time | Test Parameters
1 | 1 | 8 | A,B,C
2 | 2 | 5 | A,B,C
3 | 2 | 7 | A,B,C
4 | 2 | 9 | A,B,C
For each test number, I want a separate report page showing the article number, test time, and test parameters. Also on each page, I want to display the cumulative test time for all test numbers up to the displayed test number, but only for the article used in that test.
For this example, page three would have test number 3, article number 2, test time 7, test parameters A,B,C, and cumulative test time on article 2 of 12 (5+7), while page four would have a cumulative test time on article 2 of 21 (5+7+9).
How can I convince Access to do this for me? So far I've only been able to have a cumulative test time for all test articles, not just the test article related to the test number. To make this more complicated, Access needs to be able to have another article added at any time without having to rework the code to create the test reports.
I appreciate any help you can give me that will get me on my way.
Thanks!
Erik
View 4 Replies
View Related
Jan 11, 2006
I have a two level security system to protect my date. The first uses the MS Access security, the second is a simple login system wherby a user enters their name and personal password to gain a customised view of the data eg if the user is me, I can see all tool bars, other users cannot. What I would like to be able to do is write a query wherby I can use the users login details to diplay only their data. An example of the script I built is as follows
'IF USERNAME AND PASSWORDS CORRECT THEN LOGIN TO THE MAIN SWITCHBOARD
If Me.qpwd.Value = DLookup("PWD", "AUTHORISED", "USERID = '" & Me.quserid.Value & " '") Or UCase$(Me.qpwd.Value) = "abcd" Then
DoCmd.Close
DoCmd.OpenForm "Course Booking System"
Else
MsgBox "Invalid Password"
End If
Is there a way of including a select criteria like the following
SELECT USERID, DETAIL
FROM COURSE
WHERE USERID="Me.qpwd.Value"
I have tried several differnet versions for this syntax without success!
Any help would be greatly appreciated.
Regards
Peter
View 3 Replies
View Related
Jul 2, 2013
I have a DB with 1000+Records. Each record has a "History" field showing the date I last visited (about 20+Visits each). When I re-visit I print Report (A4 size) which gives me the address and previous visits, however I only want my report to show the last 6 visits.
I have tried both a Query & Subform and changed the "Top Values" from ALL to 6, but this only gives the last 6 visits from all records. I need to see the last 6 visits for each record.
View 1 Replies
View Related
Aug 22, 2014
I have a table 'Project Details' to which I have recently added a new field 'Last Invoice issued'. This field is a text field with a lookup and will default to 'No' for new records being added. When the related record is updated in my 'Invoices' table, I have set up a query to change 'Last Invoice Issued' to yes. This is all working fine, but it requires all the records in 'Project Details' to contain 'No' already in order for it to work. As there are over 1000 records in 'Project Details' I made a list in Excel of the right number of no's and copied it in. Most records were fine with the exception of 127. I can edit any of the other fields from the 'Project Details' datasheet or my data entry form, but when I try to edit one of the 127, I get a DataType mismatch error. I can't understand since the records are all in one table and have exactly the same DataTypes set up for each field, why I can edit some and not others? Is there some other place where DataType can be set up that may affect some records and not others?
I have tried to copy my table to post here but when I do that, I get a 'Index or Primary Key cannot contain a Null value' error due to the (New) record having the default values already in but the primary key not being filled until I save,.
View 2 Replies
View Related
Dec 10, 2013
I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.
In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.
In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.
When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.
Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.
View 1 Replies
View Related
Mar 30, 2006
I am trying to stop access displaying the "You are about Update 1 Record" etc message when i run an update query. I know i can do this in Tools/Options screen but the problem is that the database is going to be used by multiple users, and rather than changing each persons Action query option I was wondering whether there is something i can put in to the code Globally to halt the message.
Any help would be appreciated.
Regards
Mark
View 2 Replies
View Related
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 3 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
Dec 14, 2005
do update queries work on linked tables ??
i am getting a message saying operation must use an updateable query
View 7 Replies
View Related
Jul 16, 2007
I'm trying to update a table from a summation query.
It keep bombing saying not an updatable query???
It works if I I have the summation query append a table then
update one table from another.
BUT!!!
I need to do this several time so... is there a way to update a table from a summation query?
Thanks for your help,
View 4 Replies
View Related
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
Jun 8, 2006
I have created 6 update queries that take data from 6 different tables (created using crosstab queries) and place it into a single table. I ran each query after i had created it. The first worked fine. However, the next five simply updated the specified fields with the same data from the first update query!
The only explanation i could think of for this was that maybe the data was being cached as a result of the way i created the queries. I created each update query by editing and renaming the previous one. Was this a big mistake?!
View 2 Replies
View Related
Dec 14, 2007
Hi all -
I'm going to reveal my actual lack of knowledge here but I am needing help again. I need to update a temp table with information from a select query. But, for the life of me I can't seem to get it set right so that it will update.
The one caveat that I have (at least one, there may be more I am not thinking of) is that there is no ID number that is associated with the product descriptions in the temp table. In fact, it is a combination of 3 fields that make up a unique record - it is PartDescName, PartType, and PartObjName.
The design of most of this stuff is not my doing, but I have to live within this design as I am only one of many developers working on this and I don't have much say in how some of this goes off.
So, anyway, if anyone has some suggestions for me as to how to be able to use an update query to update the fields in a different table, that would be great. The only way I've found so far is to iterate through as a recordset and place the values in the appropriate column when all three identification columns match the three in the other table. This is takes quite a long time for it to do and would be not customer friendly when trying to view a report based on this data.
View 6 Replies
View Related
May 6, 2013
I'm looking for a way to fill out 5 records in one row in a table at once. I want to update a supplier and price per unit for supplier via a form. I have price per unit 1-5 and the price will be the same for all 5 records. Is there a way to do this through append or update query and if so which is best in my situation?
View 12 Replies
View Related
Aug 16, 2014
I am facing problem regarding updating of certain field of table. For example i would like to take data from a column of Table1 and would like insert that data into particular column in Table2.
Suppose Table One has data:
Table 1
ID Name amount
1 a 0
34 b 0
3 ab 0
Table2
ID Name amount
34 a 400
1 b 900
3 ab 4500
There are about 2000 records in each table.I would like to update column "Amount" of Table1 by taking data from Table2 "Amount" Field. how can i update the amount column by keeping the ID field?
View 5 Replies
View Related
Sep 15, 2006
Hi,Not sure where to post this as it covers both queries, forms and partly tables.ISSUE:I need to add two records to a query with one record in a form. Is this possible?BACKGROUND:This is a database with TV programs and the times they are to be broadcast. Tables:One table. "table_programs" contains the information about each program (title, description, length etc.). The other table, "table_times" has the times for the programs (date, start_time etc.), where one program can be shown multiple times.Query:There is one query, "query_programtimes", that combines the above two tables + two calculation fields. One calculates the end time of a program by adding the start time (from the times table) and the length (from the programs table). The other calculates a file name, based on the weekday of the date field.Form:The form is based on the "table_programs" table, with the "query_programtimes" as the data source for a subform. There I enter a program and in the sub-form one or more times for it to be broadcast.So far so good. The form adds one record to the query for each time that a program is broadcast.Now what I'd like to do is to add another record in the query for each scheduled time. That is for entering a file that will be played when a program is finished. That is, it'll take its title from the file name that is calculated in the query and the scheduled programs end time as its start time.Alternatively, and perhaps even better, this data could be in its own query and then a third query can combine the two to get the full schedule.Is there any way to do this? That is, one entry in the form is supposed to update two queries at the same time.Hope I made myself clear... :)Thanks!
View 1 Replies
View Related
Jan 23, 2008
I have set up a table (A) that is linked to another table(B) in my database. This linked table (A) is then used in a number of queries. When the data in the original table (A) is updated it does update the data in the linked table (B) as it should. However, when I run the queries they do not bring up any records. It seems that they are not looking at an updated version of the linked table (A) because if I rebuild the query it finds the records as it should. Any advice on this would be very gratefully received.
View 1 Replies
View Related
Mar 16, 2007
Hi,
Is it possible to update multiple rows in a Table at one time using Update Query?
Ta
Kasey
View 5 Replies
View Related
Mar 12, 2007
I have a table with a field called "description"
another field in fame table called "length of cable"
In description field it contains among other things, the length in it . It may be at various locations in the test data in the field. The length may be in the form xft or xxft xx foot xxfeet xx feet..
I have another field that I need to put the length in a standard form like xx feet
(The field will have different units in it later not just feet.)
I am using update query
with
criteria of Like "*3ft*" Or Like "*3 foot*" Or Like "*3 ft*" Or Like "*3 foot"
with update to (of the length of cable field ) set to 3 Feet
The data has many lengths
1ft
2ft
3ft
4ft
5ft
6ft
7ft
10ft
12ft
14ft
15ft
20ft
25ft
and one....
I would like to automate it to one query and hopefully avoid the problem I have when doing it as is, *5ft* also finds 25ft and 15ft incorrectly for the goal of the update. same on 12ft 14ft
' and " are the symbols for inches and feet.
Also some of the data is in the form xx' or xx" I hit a wall on this due to the ' character
need to do the same to that as well.
Any suggestions '''
before I lose any more hair ...
View 6 Replies
View Related
Dec 27, 2013
I am new to MS Access and using MS Access 2013.I just added 50 new fields into a table. I need to update these new fields on every record.The table layout is as followed:
Table1
-Company Id
-Question1
-Question2
-Question50
[code]....
View 6 Replies
View Related
Dec 18, 2014
im working on an update query (written in VB coding) for one of my tables, for now im just setting the value to 1 (as currently all the data is set to 0, so for now it works), however id like to improve upon the query and get it to add 1 every time instead of setting it to 1 (i can work with it the way it is, but changing it would give me more info)
currently its at
DoCmd.RunSQL "UPDATE tblBatches SET tblBatches.batchCarryover = 1;"
View 1 Replies
View Related