Jump to content
  • 0

Copying Record to same table but with new ID


Question

I am working with a legacy ACCESS application where many records are duplicated but with different primary IDs.  These were created in ACCESS with Append Queries.

The straightforward way is to find the record to duplicate, download to EXCEL, change the ID and upload to append to the table.  But I'm trying to automate this task using auto-submit submission forms. The challenge is letting the user modify the ID and create a new record in the same table.  I am not updating the original record, but keeping it.

Any suggestions welcome.  My first approach is to search for the record to duplicate, create an HTML block that passes all parameters by query string to a submission form. This form lets users change the ID and passes on to a submission form that auto-submits.  That does work if there are only a few parameters in the query string.

It fails if the query string exceeds some limit (somewhere over 1,000 characters).  Is there a known limit to query string length?  And, is there a better way to do this?

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I have bumped into long query string limits as well. This forum post provides some context: https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string

Another approach would be to use fields to pass the data.

Set the fields to text field or text area so you can pass the data on exit (fig.1). Then set the destination and messaging options to load the new page (fig.2). Lastly, capture the parameters in the submission DataPage with the ID field as a text field for editing (fig.3).

 

fig.1
image.png.301054166d4d24618b0e15510d1b39cc.png

 

fig.2

image.png.c9b9e52f7c4e7841530f04f0e1c3ebeb.png

 

fig.3

image.png.1b113bcd046ae9083c404187d1c3adcc.png

 

If that doesn't work, you can set up cascading fields to load data from the old ID. Set a virtual field to capture the old ID, use this as the parent field, set the lookup table to the table containing the original data, cascade on the old ID, and choose the appropriate field for the cascading value. I would try other options first as this will be a slloww DataPage if your data has many fields.

 

I hope this helps
 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...