Results 1 to 6 of 6
  1. #1
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43

    Copy record into pop-up form

    I have a form that allows the user to select a drop down in one of the fields. If the user selects the value "Copy" from the drop down, is there a way to copy the record's information into a new form that pops up once the drop down is selected?

    The pop up would be a new record, just with the same information. The user will then be able to edit a few fields in the pop up form.

    Trying to figure the easiest way to go about this. Thanks!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    This sounds like duplication of data. You could do it by creating a recordset clone of the first form via DAO and then updating/appending the new records in another table.

    Why not just store the relevant key fields in your new records? Primary Keys and Foreign Keys are what make a relational database work. Duplication of data is an indication of a Non-Normalized database.

  3. #3
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43
    Let me try to explain it a bit more. The database is for tracking headcount at a company. The form has Employee ID, Operating Company, Location, Employee Type, and Supervisor. Say Employee X (ID: 123, Op Comp: A, Loc: TX, Emp Type: Salary) left the company. There is a drop down field in the form for each record...so for this employee the user in the database will choose "Open" from the drop down. This prompts another form to pop up to enter a new record.

    I want to be able to copy Employee X's ID, Operating Company, and Location into the new record since this position is now open. This will just prevent the user from having to type in all the information from Employee X. Does that make sense?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Post # 2 still applies.

  5. #5
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43
    Okay I'll look into using recordset. Also when you say to store the relevant fields in your new record, what do you mean by this? We do have an autonumber primary key that I was trying to figure out how to utilize.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    As for using DAO

    Do some searches here on
    OpenRecordset
    RecordsetClone

    Primary Keys and Foreign Keys are another subject and really are the basis for a Relational Database Managemnt System (RDBMS). You can do some searches on those terms and also Normalization.

    Search You Tube and then maybe google
    RDBMS normalization primary foreign

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 11-07-2013, 04:02 PM
  2. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  3. Replies: 10
    Last Post: 03-05-2013, 03:10 PM
  4. Replies: 3
    Last Post: 03-23-2011, 11:37 AM
  5. Replies: 0
    Last Post: 11-10-2008, 12:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums