Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 244217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:59:11+00:00 2026-05-11T20:59:11+00:00

I work with a product that comes in a 2000lb sack and placed on

  • 0

I work with a product that comes in a 2000lb sack and placed on a pallet. When this product is made it has many different elements that are tested and each test has a field that the numerical data is placed in. Each of these records of tests are then assign a number, for example, L20444.

Now we have the ability to take that 2000lb sack and convert it into 80 20lb bags. Only 40 20lb bags can fit on one pallet, taking now the one pallet L20444 and making two pallets that have the number L20444. This causes a problem with inventory because the number L20444 can only be assign one warehouse location, not two.

So my bosses what to create a number that is almost the same, but different enough to place the second pallet in the warehouse. The second pallet will now be L20444B. It will still have all the same tested numbers and is a “copy” of the original L20444.

My question is can I take the record L20444 and copy all the data for that record and then save it as L20444B so that it can be placed in the warehouse.

So is it possible for VBA to copy a record, rename it, and then save it in the same database as a new record?

Any help would be appreciated, Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:59:11+00:00Added an answer on May 11, 2026 at 8:59 pm

    If I’m reading you right it sounds like you want a SQL statement to create a new record.

    You’re using Microsoft Access? I would recommend first creating a query that does this in the query editor. It will be an Append query, something along the lines of:

    INSERT INTO TableA ( ID,col1, col2 )
    SELECT [ID] & "B" AS NewName,col1, col2
    FROM TableA
    WHERE (([ID]="L20444"));
    

    Test this first to make sure it’s doing what you want, and make “L20444” into a parameter ([OldID], or something). Then add some code in your VBA script that executes this query. It should pop up asking you for OldID when you run it.

    Then you’ll need to learn how to execute parameterized queries from VBA.
    Something like this:

    Set qdf1 = CurrentDb.QueryDefs("myQuery")
    qdf1.Parameters("OldID") = theOldID
    qdf1.Execute
    

    Not tested, search VBA help for QueryDefs if my syntax isn’t quite right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I work for a small company with a .NET product that was acquired by
Our company has a product which relies on local database to work (it allows
I have a PopupWindow that has tow buttons inside of it. They work as
Our company has for many years had multiple domain names to protect our product
I wanted to find the highest palindrome that can be made as a product
I have a product admin web site that has been generated using ASP.NET Dynamic
I work on an application that has a both a GUI (graphical) and API
I'm in the process of writing a visualization library for a product I work
I work on an open source product called EVEMon written in C# targeting the
I work for a ISV. Our product can use both SQL Server and Oracle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.