Edit pivot table contents in Access 2013 - ms-access

I have a pivot table, say PivotA, and another table left joined to its primary key, say TableB. I need to edit TableB in the pivot view.
Is it possible to edit the contents of a pivot table at all? When I try to edit a cell from either source, it tells me the recordset is not updateable. It's a very vague error and I haven't found any causes relating to what I'm doing. Even if I recreate the pivot without TableB, I get the same thing.

An updateable record source is one that fulfills a few standards to ensure that Access knows precisely which row needs to be edited. Unfortunately, one of those limitations is that it cannot be updated in an aggregation or calculated field. I believe in most if not all cases, a pivot table is an aggregation of the underlying data. So by design, you will not be able to update data in a pivot table.
Here is a link that may help understand your error: Updateable records

Sorry hate to break it to you but the Access team decided to drop Pivot Tables in 2013. See: https://technet.microsoft.com/en-us/library/cc178954%28v=office.15%29.aspx?f=255&MSPPError=-2147217396
You can see a walk through of alternatives suggested by Microsoft Here: https://youtu.be/VxDWIQaO5Pg

Related

What is MySQL View for?

MySQL Documentation explains how to create a view. However it doesn't explain why should I make a MySQL View in the first place.
Thus, my question is, what is MySQL View? What is it for? At what circumstances should I make or not make one?
Quoting the documentation
The view definition is “frozen” at creation time and is not affected by subsequent changes to the definitions of the underlying tables.
I don't see how creating a view would be beneficial, so please, enlighten me.
View the data without storing the data into the object.
Restrict the view of a table i.e. can hide some of columns in the tables.
Join two or more tables and show it as one object to user.
Restrict the access of a table so that nobody can insert the rows into the table.
Where I work, we use the views as big painful querys that we need many times, we decided to create views for them instead of doing a manual query and when we need to access the information
SELECT * FROM view WHERE (anything)

Enabling view of relational database values in microsoft access (2007)

I am creating a relational database for a friend and I have never used MS Access before. I am trying to make it so that the related values are shown on a table view rather than the numeric representation. For example, instead of
[1][2242], [2][443]
I would like
[1][John Smith], [2][Marilyn Monroe]
(the first value being the primary key and the second being the value linked to another table).
I have read this page about creating relationships between tables but I am still having trouble "viewing" the linked values. Microsoft Access is going to be the only way my friend is going to be viewing these results so that is why it is important to be able to see the correct values.
I have made relational databases before but only with traditional PHP and SQL and so I know what I need to do but I cannot seem to do it.
Any help would be appreciated.
Do not be misled into creating lookup values in tables. Create a form and add comboboxes to display the data from the related table, or use queries.
For example: create form to add records in multiple tables
Or
SELECT Id, Fullname FROM Table1
INNER JOIN Table2
ON Table1.FKID = Table2.ID
You can create the relationships visually in MS Access. You can also build queries in the query design window.

Create columns that autoincrement with name in a MySQL Database

I know that this might seem like a strange question, but let me try and explain it. I have a database table called 'plan' and in it the first column is called 'username' and the columns after it are called 'question1', 'question2' and so on. I now need to add a hundred or so more columns named like this, but it would be nice to have a sql statement that would automatically do that for me.
I know this wasn't set up in the best way, but if you have a solution, please let me know :)
There isn't any SQL command or feature that would do this automatically; sure you can generate the alter table statements and add the columns programmatically; however, your design would be terribly flawed.
Instead of adding columns, you should create a table containing the question, the user_id (or username, whatever is the PK) to hold the records. If you need to identify a question by number (or ID), simply add another column called question_id.
Write the query in sql to excel. Seperate the incrementing number. Drag down until excel row 100. Hard to explain but i guess you ll figure it out. You'll have 100 incrementing add column sql statements. copy paste run it on a query tool.

how can I add records through a query in access?

Before I remade this simple database, I was able to perform a query and update and insert new records from that query. I can no longer do this and can't figure out why.
I'm not very knowledgeable with access so any help would be greatly appreciated. I have a feeling that this may have something to do with the auto number column that no longer exists. Basically, it wouldn't allow me to change the data type after I had entered data into the table. I needed to do this to preserve the primary key as they match the client's records and cannot be changed.
If I understand you right you have a query that used to work (and insert records in a table) and now doewsn't work anymore? Can you post the SQL of the query and the structure of the table that you are inserting in? That will make it a lot easier for the rest of the world to help you.

How to delete from a database?

I know of two ways to delete data from a database table
DELETE it forever
Use a flag like isActive/isDeleted
Now the problem with isActive is that I have to track everywhere in my SQL queries that whether the record is active or not. Using DELETE however gets rid of the data forever.
What would be the best way to backup this data?
Assuming I have multiple tables in a database, should I have a common function which just backs everything up and stores it in another table (in XML probably?) or is there any other way.
I am using MySQL but am curious about techniques used in other DBs as well.
Replace the table with a view that hides the inactive items.
Or write a trigger on DELETE that backs up the row to an archive table.
You could use a trigger that fires on deleting records to back them up into some kind of graveyard table.
You could use an isDeleted column and defien a view which selects all columns except isDeleted with the condition isDeleted=false. Then have all your stps work only with the view.
You could maintain a history table, where you back the record up and time stamp
One of the biggest reasons for not deleting data is that it may be required for a relation - for example the the user may decide to delete an old customer from the database, but you still need the customer record because it is referenced by old invoices (which may have a much longer lifespan).
Based on this the best solution is often the "IsDeleted" type of column, combined with a view (Quassnoi has mentioned partitioning, which can help with performance issues that might pop up due to a lot of invisible data).
You can partition your tables on the DELETED column and define the views which would include the condition:
… AND deleted = 0
This will make the queries over the active data just as simple and efficient.
Well, if you were using SqlServer you can use triggers, which will allow you to move the record to a deleted table.