Query Change Data In Table

Jun 14, 2007

quick question. If i run a query and change some data in the query will in also change the data in the table? I tried it and it in fact did. If this really does work I don't think it should be allowed to functionally do that since people can easily mess up the data in the table.

View Replies


ADVERTISEMENT

Update/Change Existing Data To New Table With Query?

Feb 17, 2008

i'm a Access novice. I have tables with existing data in numerical form, and would like to know how I can use Queries or VBA code to update these values into a new format in a new table. for example the original data might be of race type:

1 - caucasian
2 - african american
3 - hispanic 1
4 - hispanic 2
5 - hispanic 3
6 - other

and i want to regroup these into less types, eg:

1 - caucasian
2 - african american
3 - hispanic
4 - other

how can i achieve this in Access? i know how i can do this conceptually with "if" and "case" statements, but I have no idea how i can do this in Access. I don't want to mess with the original data, so please help with CODE or QUERY examples.

thanks!!

View 4 Replies View Related

Move Record To New Table After Data Change In Combo Box Value In Original Table.

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

Change Data In A Second Table From A Form

Feb 2, 2006

My client has a system whereby those employees who are off for extended periods of time (sick, Workmens Comp maternity etc) are re-assigned to a different division.

The table PERSONNEL contains all of the information for each employee. When someone in the sales division (for example) goes off long term ill their data is entered into table LTILL. Their info still remains in PERSONNEL as it is expected they will return at some point.

When I enter their data into LTILL, I would like to change thier division in PERSONNEL from sales to LTILL at the same time.

What would be the best way to go about this. The LTILL has no primary key. The obvious choice EMPLOYEENO is no good since a person my be transferred to LTILL more than once during their career.

View 1 Replies View Related

Change Primary Key / Data In Related Table

Oct 18, 2011

I am new to access 2010. I need to change the primary key in a table ("stations", Primary key is "station number"), because future entries will result in double entries for this primary key.

I have another table ("species&stations") which has records of Species for each "station number".

So I created a new Primary key for the "stations" table, now called "species id", being a bit better in defining a unique station (as it contains the year and the species number, i.e. "451_2010")

Now the table "species&stations" references/(is in relationship with) the old primary key, identifying a station number for each record.

How do I get it to recognise the new primary key from the "stations" table, and keeping the records (over 1000...) with all there info.

Approach so far: I tried to create a new field in "species&stations", which should look up the new primary key from "stations" and then autofill the field. i did not manage this though

I attached a screenshot to make the relationships more clear!

View 2 Replies View Related

Query To Change Data Layout

Feb 22, 2007

Hi there,
I have a warehouse table that lists a stock code with the last 12 periords closing balances in a record.

I would like to write a query that just shows each stock code with only one month per record and has the openning and closing balance for that month.(the closing balance of one period is the openning balance of the next period).

So the Table currently looks like this

StkCode....Whouse....12.....11......10.....09..... .08.....07
1111.........TZ..........100....200....300...400.. ...500...600

I would like it like:

StkCode....Whouse....Period....open....close
1111.........TZ..........12.........200.....100
1111.........TZ..........11.........300.....200
1111.........TZ..........10.........400.....300
1111.........TZ..........09.........500.....400
1111.........TZ..........08.........600.....500

I haven't worked with access for years and can see how to do this in my head - i just can't figure out what to write. Any help would be greatly appreciated.

View 3 Replies View Related

Modules & VBA :: Selecting Fields - Change Text To Include Data From A Table

Nov 5, 2014

I have an on click event to mail a report which works. I want to change the text to include data from a table.

I changed the code to include the field 'office' from the table 'Checks' but get an error saying 'Object required'.

Code is :
Private Sub cmd_mailreport_Click()
Dim office As Object
Set office = Checks.office
DoCmd.SendObject acReport, "checks", "PDFFormat(*.pdf)", _
"info@company.com", "", "", office & " Daily Check - " & Date, "Attached is the report for the office", _
True, ""
End Sub

View 1 Replies View Related

Queries :: Change Data In A Query When 3 Tables Are Involved

Aug 13, 2013

I know that i can edit contents in a single table query and it will update the data in the underlying table, but how do i gain the ability to change data in a query when 3 tables are involved?

View 4 Replies View Related

Forms :: Change Button Color After Data Change

Apr 5, 2014

I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form

2346 location warehouse price 29.99 (button - green)
2347 location shop price 29.99 (button - red)

View 1 Replies View Related

Modules & VBA :: Change Certain Records Of A Query Or Table

Dec 12, 2013

I want to change certain records of a query or table.Here I tried to change this in a query. Something is missing in my code.

Code:

Public Sub TNS_QUERY()
Dim strSQL As String
Dim x As Double
Dim qdf As QueryDef
strSQL = "SELECT TEST_TNS.[TestID],TEST_TNS.[Division],TEST_TNS.[Customer_Split],SUM([TOTAL_NET_SALES]) as [TNS] " & _
" FROM TEST_TNS " & _
" GROUP BY TEST_TNS.TestID,TEST_TNS.[Division],TEST_TNS.[Customer_Split]"

[code]....

View 7 Replies View Related

Queries :: Field In Table Doesn't Change When Edited From Query

Mar 29, 2013

Users are viewing a record on a form that gets it's data from a query. I want to make it so that if they edit that record from that form, a last updated field will timestamp the date/time that the record was edited. I added a lastupdated to the source table which of course adds it to the query and so it's on the form.

But whenever i access the form and change something, the lastupdated only shows the time the record was created (which is from a different form based directly on the table). Whenever I edit any other field data in that query based form it changes in the table. Why not the Lastupdated?

View 2 Replies View Related

Queries :: Filter Data From A Table Using Query (from Data Input Form)

Dec 30, 2014

I would like to filter data from a table using a query (from an data input form). The objective is to output all results if input form field is empty and to output results higher or equal to the type in the field if field is not Null. The query code is as follows:

IIf(IsNull([Forms]![Form2]![MaxDiffInput]);[Maximum operational pressure (bar)];[Maximum operational pressure (bar)]>=[Forms]![Form2]![MaxDiffInput])

However, is not providing any result when the input field (MaxDiffInput) as a value.

View 5 Replies View Related

Changing Data In Query Results Changes Data In Source Table

Dec 17, 2012

I have a table and a simple query that pulls results from the table. Nothing too crazy. But, if I were to go in and change some of the data/values in the query results it will change the respective data in the table. I know that this cannot be right. What do I have to do to either prevent the ability to change query results and/or prevent any changes in the query from altering the original data in the table.

View 2 Replies View Related

Extracting Data From Linked Db2 Table Using Access Make Table Query

Aug 29, 2006

Hi,
I am extracting data from linked db2 table using access make table query. First I create a select query and can view the linked db2 data, but when I change to a make table query I get an error message, "invalid argument", when I run the make table query. There is no selection critera specified. Has anyone had this happen? and Do you know a solution?

Thanks for your support
GinnyP

View 1 Replies View Related

Tables :: Transfer Data From Table Or Query To Second Table

Apr 25, 2014

Let's say that there're 2 workers: Worker A, and Worker B, and they are fixing some engines. There's 2 different engines: Engine A, and Engine B. And these workers are fixing these engines for all day, and in the evening they have to register how many engines they've fixed.

And my job is to design Access database for them. I thought it will be very easy to do; I've created table with columns: Date, Worker, Engine, Quantity - so every day Worker A and Worker B can register, that they have repaired some amount of Engines A and Engines B.

But there's a problem that I also have to register how many Engines have arrived to the factory, and how many of them weren't repaired on time (E.g. 15 Engines A have arrived, Worker A fixed 5, Worker B fixed 5 so there's 5 engines left for tomorrow)

I've figured out that I should somehow create table IncomingEngines with columns Date, Engine, Incoming, Fixed, Undone (field Fixed should be completed automatically every day for every engine - it would be a sum of engines A and engines B fixed by worked A and worker B - so I could fill Incoming field manually)

It's easy to create this kind-of Query, but I can't add column to querry, or edit it.

View 3 Replies View Related

Queries :: Export Query To Excel Then Delete Query Data From Table

Nov 20, 2013

I am wondering if there is a quicker way to export a query to excel then have the data in that query removed from the original table. (effectively cutting the data from the table and exporting to excel)

I understand that this can be done by exporting the query to excel then running the same query as a delete query to remove the data but I just wondered if this is the most efficient way.

I have experience of VB in excel but currently only use the basic macro builder in Access though if Access VB is more efficient I can easily learn.

View 5 Replies View Related

Transfer Data From Table Or Query To Second Table

Apr 25, 2014

See example below:

Let's say that there're 2 workers: Worker A, and Worker B, and they are fixing some engines. There's 2 different engines:

Engine A, and Engine B. And these workers are fixing these engines for all day, and in the evening they have to register how many engines they've fixed.

And my job is to design Access database for them. I thought it will be very easy to do; I've created table with columns: Date, Worker, Engine, Quantity - so every day Worker A and Worker B can register, that they have repaired some amount of Engines A and Engines B.

But there's a problem that I also have to register how many Engines have arrived to the factory, and how many of them weren't repaired on time (E.g. 15 Engines A have arrived, Worker A fixed 5, Worker B fixed 5 so there's 5 engines left for tomorrow).

I've figured out that I should somehow create table IncomingEngines with columns Date, Engine, Incoming, Fixed, Undone (field Fixed should be completed automatically every day for every engine - it would be a sum of engines A and engines B fixed by worked A and worker B - so I could fill Incoming field manually)

It's easy to create this kind-of Query, but I can't add column to query, or edit it.

View 3 Replies View Related

Queries :: Updating Child Table List View On Change Of Main Table Row

Apr 19, 2013

Here's a query that the bottom listview in the attached form i.e. a listview representing a table of calls(many) to fims (1 top listview)

Code:
SELECT calls.id, calls.firm_id, calls.called, calls.said, calls.spoke_to, calls.next
FROM calls
WHERE (((calls.firm_id)=[firms].[id]))
ORDER BY calls.called DESC , calls.next DESC;

When I run the thing...I get a dialog asking me for firm id.

I want to change this so when I move up and down the firms LV (top)... the bottom LV updates taking firm id from the top LV with focus.

Access 2003.

View 2 Replies View Related

Data Source Change

Nov 21, 2005

If the data source changes for an Access database, do I need to recreate all the tables, queries, and reports? I am having quite a time with this issue. Thanks for any assistance you can provide.

View 1 Replies View Related

Change Data Type

Nov 10, 2007

I'm using Access 2002 and need to increase some field sizes, some by increasing the maximum number of characters and others by changing from Text to Memo. When I try to do this I get the message "Microsoft Access cannot change the data type. There isn't enough disk space or memory"

I have two 320GB hard drives and 4GB of RAM and the Access file is a mere 280MB. Can anyone please explain the problem and tell me how to achieve my objective?

Roger

View 6 Replies View Related

Change Data Type

Jan 26, 2007

Does anyone know if its possible to change the data type of a field from "Text" to "Number" by using a macro?

thx

View 1 Replies View Related

General :: Can't Add Or Change Data

Oct 16, 2013

I finally found and eliminated all duplicate entries in my tblStoreProducts table, so that I could create a 2-field Index called UniqueProduct that would prevent duplicate entries. Without it, uploading information from Excel (not the preferred method) would result in duplicated entries in this table which would ultimately reflect in the Hazardous Materials reports that must be submitted to the fire marshal.

Today I was going through data entries in the Product table and noticed some that are STILL coming up with the UPC (a text field) in Scientific Notation.

I know that I have to change the information in the linked table tblStoreProducts first. The most simple way would be to just change the UPC of the product in that table to the correct UPC. It shouldn't be causing a problem, because it doesn't create a duplicate record. I'm getting the error "The text you entered isn't an item in the list" now that I've created that index.

I changed the index to Unique = No and still get the same error.

I removed the index all together...still get the same error.

I'm making the changes directly in the BE database right now. If I can't enter information directly, the forms aren't going to work either.

View 3 Replies View Related

Change Value In A Table Based On Criteria From A Different Table?

Sep 22, 2015

In my database I have 2 tables that contains values I would like to add if a check box is marked.

Table 1 columns: JobID;JobNumber; Product; Qty.

Table 2 columns: COrderID, JobNumber, QtyChanged, Accepted(Accepted has the check box).Also, there are multiple records for each job number based on how many change orders will be.

I would like to change the value of Qty on Table1 with the values of QtyChanged from Table2 only if the checkbox is marked.

View 6 Replies View Related

Change Data Type When Importing

Sep 26, 2006

Hi,
I am trying to import an excel spreadsheet into Access2000 using the import wizard.
I choose my XLS file, I say whether or not the first row contains headings, (no is the anwser).
Then I want to change some of the fields to data type of memo from text, but all I can see if Field 1 and data type option is blanked out.
If I click or double click on another field it doesn't change.
so I cannot change the datatype of a field..
do you know why, and how I can fix this ?

The reason I want to do this is one of the rows in excel has 300 characters, and the text field in access only allows 255.


regards,
Jamie

View 5 Replies View Related

How To Change To Boolean Data Type??

Apr 17, 2007

my teacher asked me to do Access homework to change data type from Text to Boolean. Data in "Owned car" field show as Y or N
17178
so I click on Design View and change datatype of this field from "Text" to "Yes/No" , than when I saved it show a message
17179
When I back to Datasheet view, all data in "Owned car" field change to be "No".

How can I change data type to be Boolean type without deleting my original data??? I want them to show the same as Y or N.

View 1 Replies View Related

Not Able To Enter Or Change Data In A Forum

Aug 13, 2007

Here is my problem:

I created a Query to calculate an over all rateing useing other data that was already in the database. The Query worked out perfectly, and I then wanted to put the one field that gave me the overall rateing that I just calculated and put it into a form. So I added the Query with the rateing into the one that made up the other form and added the field to the Query. The problem was that when i went into that form and added the field, it made it so that i could no longer change any of the data on that forum. I thought that it might have something to do with the fact that there were no fields with math in them in that form untill i added the over all rateing one, could that have messed it up? Please send me some seggestions because I havent a clue at what could be worng. Thank you, Ben

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved