Relationships - Delete User But Keep History / Data

Feb 19, 2014

I have a DB setup with users and their information. How can I remove a user from the DB without losing their data?

Basically I just don't want the users seeing this (deleted) user in the list on a form. So maybe "hide" is a better term than delete.

Details:
Access 2010

Table "Employees" - holds username and some other user specific info.
Table "Hours" - holds username related data(how many hours they worked on specific dates).
Form "WorkHourEntry" - The form I use to allow the users to login and enter their data(hours).

Then have a combo box that displays all the users in a list. This list/combo box is where I want to hide users from when the employee leaves the company or dept. and is no longer needed. But, we need to keep their history/data.

View Replies


ADVERTISEMENT

Modules & VBA :: Copy Record To History Table And Then Delete It From Main Table

Jul 9, 2014

I have a form with a sub form. when a record is choosen in a combo box the sub form is filled out with a record.

what I am trying to do is have a button that will copy that record to a history table then delete it off the the main table.

I cheated by using the wizard to get the code to delete the record but I am having troubles modifying the code to copy that record to the history table. Here is the code below. I have tried to insert code in several places but it just errors out.

'------------------------------------------------------------
' Master_tbl_sub_fm
'
'------------------------------------------------------------
Function Master_tbl_sub_fm()
On Error GoTo Master_tbl_sub_fm_Err
With CodeContextObject
On Error Resume Next

[Code] ....

View 8 Replies View Related

Programatically Delete Relationships?

Mar 3, 2006

I know you can manually delete table relationships in an .mdb, but I was wondering: Can you programatically delete table relationships? If it is possible, how would it be done?

Thanks in advance to all you nice folk who reply.

View 14 Replies View Related

Delete Records With Multiple Relationships

Sep 20, 2006

Hi

I am in the process of designing a sports database and have come across a problem that I can not seem to fix.

I have 3 tables that are linked, they are Customer, Program (this is the customers exercise program) and Health (the customers health records).

I have tried to set up a query that deletes a customer if a command button is clicked. This works find as long as the table I am deleting the data from is not linked to another table.

However when I try to delete a customer record it says that I can't as the data is linked and I have to delete the relationships first.

The only way I can think of doing this is to setup a query that deletes all the data in each table at the same time. I can not get this to work though.

Is this a problem that can be solved or will I have to change the way my relationships are set up?

I would appreciate any help or suggestions.

Thanks

View 4 Replies View Related

Help With Data Structure And History Log!

Mar 24, 2006

Hi Guys

I am pretty new to programming with access but i am trying to create a database system with history logs and i am stuck on how to structure it.

I'll explain a little more, i am trying to setup an application so that if somebody brings an item into myself to purchase i can book it into the system so that it records the customer that it came in with and also the item details. I will then need to resell this product onto another customer, the problem i am having is that once the item has been purchased and sold on i will then need to keep a record of this so that if the customer comes back with the same item he has purchased to resell back to us we can keep all the details in history so that each product that is purchased and re-sold has all its past history from every customer that has purchased it and sold it back to me.


Any help would be much appreciated.

Thanks
Brad

View 1 Replies View Related

Preventing End-user Seeing Tables And Relationships

Apr 24, 2007

Hello,

I was wondering if there is any way of stopping people from seeing the tables that I have created and the relationships between said tables?

I want to restrict access so that users can only see the forms and access the reports that I've created but am not sure how to go about stopping people from seeing, never mind altering, the table names and structures. Can anyone help??

View 5 Replies View Related

Delete User Information In System.mdw File?

Jun 15, 2006

Is it possible to delete user information in workgroup information (System.mdw) file from command line or programmatically?

Thanks

View 1 Replies View Related

Queries :: Setting Delete For User From Form?

Jun 30, 2013

What is the best way to set delete for user from the form? All code, or part code and use a query, or something different? What is the best criteria to have user use? I just go to datasheet and zap, but I don't want user going into datasheet.

View 3 Replies View Related

How Can I Excute Code When The User End The MS Application By Alt+Ctrl+Delete

Aug 22, 2007

Some times, the system become stuck, which forces the user to end the program using Windows Alt+Ctrl+Delete. I have MS Access code which I want to execute when the user made the 'End Program' event using the Alt+Ctrl+Delete.

Thanks,

View 12 Replies View Related

New Data, But Keep Relationships

Mar 19, 2008

You know the scenario where people keep working in an old version of a database, while you work on an update... leaving you with a new database, but old data?

This concerns a database, containing about 20-25 tables all linked together.
I was asked to make an update. In this update 3 new tables were included and here and there a few of the old tables got news fields, nothing crucial and a lot of forms were changed.

The current situation:
Database 1: contains new data, misses a few tables, is missing some fields, forms and queries
Database 1.1: contains old data, but some new extra tables, added fields, forms and queries

I would like to know if it is possible to import all data from 'database 1' into 'database 1.1', so that all linked information between the data is preserved, all database relations are maintained.

If I import tables from Database 1 into database 1.1, tables just get added, not replaced. If I delete or rename tables, I loose my relationships.

I would like to know what is a common and effective way to get all the new data of an old version of a database (where people keep working in while you work on an update), into the new version of the database, that currently contains old data.

View 3 Replies View Related

Data Entry And Relationships

Jan 31, 2006

Hi everyone,

I have a relationship between Market data table and Trade table which is One to Many. Market on the One and Trade on the Many.
However I just found out that I am unable to enter information into the Trade Form without entering information into the Market Form first.
I would like to enter info. into Trade Form/tables independent of whether I enter info. into the Market Form/table, but I still need to have the relationship of One Market data to Many Trade date.

Thanks

dfuas

View 5 Replies View Related

Relationships And Wrong Data

Aug 20, 2007

I have 2 excel sheets that I have imported as external data. I created a relationship between the 2 tables on part# field that is common to both. The relationship is to take all info from A table and only those from B table that match. The part# field is set to text in both tables. When I run a report that merges the 2 together a significant # of parts in my field change to a negative number. For instance the part# in both tables are 12345678 it is changed to a random -3452345 number..

Any ideas?

Please help

View 1 Replies View Related

Normalization And Relationships - Don't Know How To Place Data

May 31, 2005

Hi, I want to create an access app that will allow a user to see the number of pages printed by various printers.

These are the data that I have:
Model Type (various are available)
Printer's name (unique to one printer)
IP addr (unique to printer)
Quantity printed (such as Single Legal, Double Legal, Single Letter,etc)

This is what I have (2 tabels with 1-many relationship):
Printers
PrinterID
Model
Name
IP

ModelTypes
ModelID
Model

Now, where do I place the quanties of paper printed? Do I just leave it in Printers?

Thanks.

View 9 Replies View Related

Relationships And Table Data Cascading

Nov 22, 2006

Hi All

I've worked with Access in the past but haven't touched it for 6 years now so I've forgot a lot of the things i've learnt. Bare with me while I try and explain it as clearly as possible

I'm creating a Database for work which will register all our Commerical Clients, which projects the clients are related to and which students worked on them projects. So I have 3 main Tables:

1.Commercial Clients
Client ID
Company Name
Contact
Title

2. Commercial Projects
Project ID
Nature of Project (Graphic Design, Multimedia, Media)
Project Name
Project Information
Staff Member Responsible
Start Date
End Date

3. Students/Graduates
Student ID
Student Name
Area of Expertise
Contact Details
Last Project worked on

Right here we go.....

Each commercial Client can have more then one project to their name. Each Project can have more than one student working on it and each student can be working on more then one project.

My relationships are set up like this:

Commercial Clients <One to Many> Projects
Projects <Many to Many>Students

What I have done is create forms with sub forms in to enter to extra data. I dont know if this is the right way to do it but it seems to easiest way. Please show me a way that will work better if you know it.

Anyway... the way the tables are now I can on cascade the information down through the tables.... it will not cascade upwards. I have ticked everything you can possibly tick for all relationships. So when I can enter projects in the Subform on the Commerical Clients Form and I can enter students on the subform in the Projects form. But on the Student form the projects the students at on does not show up in that subform and entering the day only tries duplicating it (which i dont want to do). If I had a form that showed the projects and the related commercial clients in the subform it wont find the commerical clients. So i.e.

It shows fields when the cascaded down like:

Commercial Clients
V
V
Projects
V
V
Students/Graduates

But it wont show if its:

Commercial Clients
^
^
Projects
^
^
Students/Graduates

Anyone have any ideas how I get get them to cascade upwards?

Thanks

Pete

View 9 Replies View Related

Data From Multiple Tables Without Relationships

Aug 15, 2006

K,

Maybe a noob question, but I'm still learning access (I know a little late at the age of 37, but better late then never).
I have a form with several tabs, linked to a table with employee information, works like a charm.
Now, my last tab is called settings, maybe no need to say that the information from this tab needs to be called from a different table called settings.
Certain information, like version number, department, etc I want to display all the time in the header and I want to be able to manipulate that information through the settings tab.
I definately don't want any relationships with the employee table.
Is there a simple way to achieve this, I tried drag and drop but this leads to errors, so definately I do something wrong here.
Much appreciated,

View 6 Replies View Related

General :: Displaying Data In Many To Many Relationships

Aug 26, 2014

My problem is displaying data in many-to-many relationships.

There are three main tables: tblShops, tblOwners and tblMarketingEvents.

These are linked through two junction tables creating two many-to-many relationships:

1) Each Shop may have more than one Owner and each Owner may have more than one Shop.
2) Each Marketing Event may reach more than one Owner and each Owner may be reached by more than one Event.

Now I want to display for each Marketing Event:

1) the data of that event, (tblMarketingEvents)
2) plus the owners reached in that event, (tblOwners)
3) plus all the shops owned by the owners reached in that event. (tblShops)

Preferably, I want to display more than one record at a time without repeating any information.

Is there a way to display the data like this?

I tried a query: it gives the right data but does not display it as I need. It repeats the data from tblMarketingEvents and tblOwners for each shop.

I tried a form with subform: it can only display one record at a time and is hard to work with (printing etc)

I tried a report with grouping levels based on the query: Again, right information, wrong display. I need to group according to the records of the MarketingEvents table and not just according to a single field.

View 3 Replies View Related

Forms :: Subforms And Many To Many Relationships - Data Not Retained

Jun 4, 2013

I have created a form with two subforms. The context of this is a litigation database. The main form is for testimony. Among other things, it includes a field for a question and an answer. Any given piece of testimony may relate to one or more documents, and any document may be referenced in one or more pieces of testimony. So have two subforms, one for documents produced by the Plaintiff, and one for documents produced by the Defendant. It worked out easier that way because I originally created indices of those documents in separate Excel tables which I then imported to Access.

So the relationship for both document tables relative to the testimony table is many to many, which is established using two junction tables.

I also have a combo box in each subform where I can autofill fields based on selection of the document number.

My problem is that while the combo-box works great, once I select a document in the subform, that selection is carried over into the next entry of the master form, but also the selection is not retained in any of the master forms. So I can browse the document listing from any entry in the master form, but I can't get the document selection in the subform to stick and create a lasting relationship to a given record in the master form.

Is my problem that it is just impossible to have a subform based on a many to many relationship, or is it in the parent child relationship of the form and subform, or is it in the properties of the subform?

View 13 Replies View Related

Tables :: Multiple Many-to-many Relationships With Hierarchical Data

Aug 5, 2013

I'm building a database about languages and the segments (sounds) they contain. So far it's a many-to-many relationship between languages and segments, and I've set it up as follows.

tblLangInfo: LangID (PK), language name, language family, etc.

tblSegments: SegmentID (PK), Segment -- this table has only one field, with 24 records, each one a type of sound I'm interested in

tblSegmentLangJoin: LangID (PK), SegmentID(PK)

I have another table, tblProcesses, with an (exhaustive for my purposes) list of the "processes" (a linguistic term) a language might have, which also has a many-to-many relationship with tblLangInfo. Thus two more tables:

tblProcesses: ProcessID (PK), Process name

tblProcessLangJoin: LangID (PK), ProcessID (PK)

Here's the fun part...

I'm interested in documenting which segments can participate in which processes, as either a trigger or target. I think this necessitates yet another table, tblProcessParts, with an exhaustive list of the decomposed processes, by which I mean:

Process1_triggers
Process1_targets
Process2_triggers
...

This table is thus also two fields, ProcessPartID (PK) and ProcessName_trigger/target.

The relationship I need to capture is: *given* a language, relate each segment to 0 or more ProcessParts. This relationship is many-to-many, and this on top of the other many-to-many relationships described above.

E.g., "t" in Lang1 might be a trigger and a target for Process1, but "t" in Lang2 might be just a trigger for Process1, while "t" in Lang3 might be neither a trigger nor a target for Process1 (though Lang3 does have Process1), and finally "t" might be neither a trigger nor a target for Process 1 in Lang4 because Lang4 doesn't have Process1, etc.

I've attached a picture to illustrate the relationship I need, since that's likely clearer.

One possibility I thought of was to change tblLangSegmentJoin to have a third field that is the primary key (LangSegID), and relate that to the ProcessPartID table. How to appropriately define my data tables and relationships.

View 3 Replies View Related

Best Practice To Handle Poor Data Quality In Relationships?

Jul 21, 2007

I'm attempting to normalize an enormous table with order data, but I'm running into some problems. The table currently contains many duplicates, of which also included the actual order information (yikes!), but I managed to normalize it almost all the way down. It appears that different accounts can be used on orders, and these order numbers are being recycled for some reason months down the line (don't ask my why they're reusing them for future orders because I have no idea either, they should be creating new order numbers). Of course, the Order number is the primary key in my table as it should be. I guess the same thing can occur with the sales rep. Anyway, I'm struggling to find the "best practice way" to deal with this situation. I'm almost tempted to create an intermediary "transaction table" or something like that between the main general order information (which at this point will basically be the Order Number and Customer ID only), then include a table with the account information and sales rep info, then have that link to the Order Detail with the products, quantity, order number and various dates for those order numbers. Order maybe it should be a separate, related table, but not between the general order information and the order details? Can anyone tell me if I'm on the right track for this situation? It was a total curveball that the rep and account information could be different on these orders.

Option 1:
Order (Order #, Customer) -> Transaction Information (Order #, Account Type, Sales Person) -> Order Details (dates, products, quantities, etc)

Option 2:
Order (Order #, Customer)---> Transaction Information (Order #, Account
| Type, Sales Person)
|
|-> Order Details (dates, products, quantities, etc)

View 2 Replies View Related

Forms :: Define A Form Based On Relationships To Input The Data

May 3, 2013

I am a novice to access. I am building a database in an effort to learn in the process. I wished to enquire about the possible issues that could be with defining the relationships that i have created in the project. (attached img).

I cannot seem to define a form based on these relationships to input the data.

View 14 Replies View Related

Forms :: Saving Specific Data From Data Entry Form Depending On User Selection

Dec 18, 2014

I am trying to save specific data from a data entry form to a specific depending on what the user selects from a dropdown/combo box.

So if the user selects "test company from the combo box, that data (from that form) will save to the Test company data table.

View 5 Replies View Related

Delete All Data At Once, Possible?

May 29, 2005

Because of a data-import I would like to import all new data into existing tables. Therefore I first need to dump all my existing test data throughout 30 tables which have several relations.
Is there a command in access or a batch script which performs a bulk delete among all tables?

View 3 Replies View Related

Compare Same Data - Delete

Aug 15, 2006

Hi guys,

I have 23k records

I have run the wizard to find all the duplicates according to one field.

So i have the results, except that some of the records contain nothing within the searchable field - so it returns all the records with nothing in the searchable field as duplicates.

How would i modify the query to perform the search but exclude the records with no data.

The SQL query below is the default wizard output for find duplicates, how would i change this??

SELECT Master.EMAIL, Master.MemID, Master.MEMBERNO, Master.FIRSTNAME, Master.LASTNAME, Master.POSITION, Master.ORGAN, Master.ADDRESS1, Master.ADDRESS2, Master.ADDRESS3, Master.ADDRESS4, Master.COUNTY, Master.COUNTRY, Master.POSTCODE, Master.SALUTATION, Master.MOBILE, Master.TELEPHONE, Master.WORKPHONE, Master.FAX, Master.RATE, Master.CLASS, Master.ADDREF, Master.DATEJOIN, Master.WEB, Master.Field26
FROM Master
WHERE (((Master.EMAIL) In (SELECT [EMAIL] FROM [Master] As Tmp GROUP BY [EMAIL] HAVING Count(*)>1 )))
ORDER BY Master.EMAIL;


Another thing is, once i have the result... which query would i use to actually delete the duplicate data??

Cheers, and advance thanks!! :cool:

View 9 Replies View Related

Check And Delete Data

Jul 9, 2012

I have data, in which want to keep Job Id as primary key. Now, there are some Invoices as well as Invoice reversals with the same amount against those invoices. Check those Invoices & Invoice reversal of the same amount & delete that data of that Job ID. How to do it in Access or is there any other way to do it?

View 1 Replies View Related

Automatically Delete Data From Certain Fields

May 23, 2005

I have a table in my Database that uses the feilds Location and partnum. I use a barcode scanner to generate each of these fields. The problem I am having is that when our part number is scanned it contains data such as "des--. 123456 --aa". I have been doing a find/replace on this data to remove the "des--." and "--aa" but I was wondering if access has a function to do this for me so that I can get a macro to check automatically for this type of problem. Any ideas?

View 1 Replies View Related

How Do I Delete All Data Inside A Table?

Jun 14, 2005

I've been testing my scripts so my database has a whole bunch of bogus records in it. I'd like to simply delete everything out of my orders table (there aren't any legit ones in there yet) so that I can start over when I go live and not have all that crap in there.

Is there an easy way to do this without re-creating a blank database and copying/pasting table only over?

View 2 Replies View Related







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