Full Version: Deleting Cell Data While Keeping The Record Intact
UtterAccess Forums > Microsoft® Access > Access Forms
gremlad
I've started tearing my hair out about this problem so I hope its not too easy!
I have a database containing personal information as well as business derived information about their activities while they have worked at the company.
When that individual leaves I want to be able to delete the personal data but leave the work related data intact, is there a macro function or vba code which will delete the contents of the cells I specify.
This is data such as name, address, phone number, NI number, personal bank details etc but I want to keep data such as date started, date left, job title, training attended (which is all held together in the same record)
Oalready have a form in place which contains the data I want to delete which would be a good place to imbed any macro in a button but I only want to delete selected data in a single record... once at a time.
I hope this makes sense
Thanks!
Graham <
Jeff B.
Graham
quot;how" depends on "what" ...
You said "there is data ...", but didn't indicate your table structure. Are all those fields on a single table?
More info, please...
gremlad
Hi Jeff
All the data I wish to delete is all dirived from a single table named employees, the form I have then comes from a query which shows only records of those who are currently employed.
Thanks
Jeff B.
If all your data about employees and their assignment(s) is in a single table, then you've committed spreadsheet on Access. Even though Access tables look like spreadsheets, they aren't.
If "relational" and "normalization" are unfamiliar terms, brush up on them before expecting to get good use of Access' relationally-oriented features/functions.
gremlad
... thanks for the glib remark!
The database as a whole is a management tool for the business which allows costing of goods based on sales figures and projected overheads; the employee table is just one part of that allowing the company to calculate its overheads and was a bolt-on designed to do the job whilst also acting as the HR cental database.
Im not sure how this is getting closer to an answer though
Galaxiom
I would enter a value in the Tag property of the personal controls and use a loop through the controls collection to set the values of these to Null.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.