Results 1 to 2 of 2

Thread: Copy UID

  1. #1
    Join Date
    Feb 2006

    Unanswered: Copy UID

    Hi ,
    I have a main form where new records are added, one of those fields is
    a autonumber which is a primary key. The user will fill out all the
    fields and open the next form which is bound to a different table but
    has a Foreign key of the last table (which will be blank as its a new
    record in the main table) , i can't figure out how to copy the id from
    the first form and paste it onto the next form in the foreign key field
    on openevent.


  2. #2
    Join Date
    Nov 2003
    Something like this I should think....

    in the main Form where you're going to open the second form:

    DoCmd.OpenForm "mySecondFormName", acNormal, , , acFormAdd
    Forms("mySecondFormName").ForeignKeyFieldName = Me.MainFormAutoNumberFieldName

    Self Taught In ALL Environments.....And It Shows!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts