UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Create New Record Within Form With Previous Record Clone, Access 2016    
 
   
Matrekz42
post May 28 2020, 07:13 AM
Post#1



Posts: 58
Joined: 7-August 07



Hello everyone! I hope everyone is doing well and staying safe.

I have a form that has a table attached to it with employee information, the employee then has various toggles they can select from and populate different information.

I want to check if multiple toggles are selected that the employee information that the form originally loaded with is passed to the new record.

I have the multiple selection check in place, but for the life of me I cant figure out how to pass the prior information.

I tried with recordsetclone and that works, however, when selecting the new record half of the data is populated on the old record.

Any help would be greatly appreciated.
Go to the top of the page
 
Jeff B.
post May 28 2020, 07:21 AM
Post#2


UtterAccess VIP
Posts: 10,489
Joined: 30-April 10
From: Pacific NorthWet


You've described "how" you want to do something, but I'm not very clear on "what" that is. What will having "duplicated" record/information then allow you/your users/Access to do?

--------------------
Regards

Jeff Boyce
Microsoft Access MVP (2002-2015)

Mention of hardware or software is, in no way, an endorsement thereof. The FTC of the USA made this disclaimer necessary/possible.
Go to the top of the page
 
projecttoday
post May 28 2020, 08:25 AM
Post#3


UtterAccess VIP
Posts: 12,387
Joined: 10-February 04
From: South Charleston, WV


Is the idea to reduce repetitive data entry?

--------------------
Robert Crouser
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 09:28 AM
Post#4


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


It is seldom a good idea to duplicate records, so our concern here is WHY you need or want to do it.

There are some specific situations where elements of a previous record, say for example an order for various products, where later orders have the same products required, in which it is useful.

But duplicating a record about a person seems like it wouldn't be in that niche.

Why do you want to do this?

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
Matrekz42
post May 28 2020, 01:26 PM
Post#5



Posts: 58
Joined: 7-August 07



More along the lines of carrying over the user's information that was previously identified via dlookups and a criteria I seet up when the user logs in.
Go to the top of the page
 
Matrekz42
post May 28 2020, 01:31 PM
Post#6



Posts: 58
Joined: 7-August 07



I basically want to create a new record with the user's information that is selecting it. That information was the default data that was set on the first record when the form was loaded.
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 01:43 PM
Post#7


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


That is what I feared. That is not needed. That is not how relational database applications work.

Each person has ONE record in ONE table. The fields in that table include things like FirstName, LastName, HireDate (if you are tracking employees, for example). It also has one field that serves as the Primary Key for that employee. In Access, we most commonly use the AutoNumber to provide those Primary Keys.

In any other place you need to refer to an employee, you use only that Employee's Primary Key. You do not copy any of the other fields for the employee.

Suppose you want to track Employee vacations, for example. The Vacation table will have fields like "StartDate" and "ReturnDate" and any other fields needed for your business. In addition, that table will have its own Primary Key (again, normally an AutoNumber) and it will have a field for the Employee Foreign Key. That Foreign Key is the same as the Employee's Primary Key in the Employee table. You do not have to copy other fields to set up a vacation, you only enter the Foreign Key that identifies the Employee taking that vacation.

We have a good set of reading materials here that cover this and other aspects of designing and creating relational database applications. Please invest some time in studying that topic in order to make your relational database application as effective as possible.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
Matrekz42
post May 28 2020, 01:46 PM
Post#8



Posts: 58
Joined: 7-August 07



I understand the written and unwritten rules of normalization, but each record triggers an email that is sent for approval, hence why I need the information to be duplicated. Is there a way when record cloning to do this or not? I'm successful with the clone part, but I cannot get the next edit to go to the clone record.
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 01:49 PM
Post#9


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


Again, you do not need to duplicate data to accomplish this.

You want to include certain fields from the employee table in an email as part of the body of the email? You only need to create a query that includes those fields from the employee table, along with whatever other fields are required from other tables or values from controls on a form.


--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 01:51 PM
Post#10


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


There are ways to clone records, yes. This is not a case where it needs to be done.

Allen Browne has a method to do that.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
Matrekz42
post May 28 2020, 02:42 PM
Post#11



Posts: 58
Joined: 7-August 07



Thanks, I was using Allen's method, but I cant get it to reflect the change in the newly created record, hence it overrides/updates the prior record and adds a row with the fields called in Allen's solution.
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 03:00 PM
Post#12


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


At the risk of repeating myself again, I would not even go down that path anyway. A query joining in the employee table will make the needed fields available to the email output without having to create new records for those employee fields ....


--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
GroverParkGeorge
post May 28 2020, 03:08 PM
Post#13


UA Admin
Posts: 37,482
Joined: 20-June 02
From: Newcastle, WA


Tell you what. If you can provide a small sample accdb to illustrate the required output (including the email output portion), we can probably help you develop a viable solution. We only need enough sample data to work with. Please omit any confidential data.

Thanks.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
projecttoday
post May 28 2020, 04:07 PM
Post#14


UtterAccess VIP
Posts: 12,387
Joined: 10-February 04
From: South Charleston, WV


Can you type in your table layouts and an example of what you want?

--------------------
Robert Crouser
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    9th July 2020 - 06:28 AM