Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008

    Unanswered: macro for opening new record and copying primary key

    I have 3 tables:
    PD: personal data,
    FE: first event
    RE: reevents

    Each hay unique primary key. They are related one to many: PD-one to many- FE and FE-one to many-RE.

    I am working on form. I have part of screen for personal data. If I have new custumers I have to write personal data first. Then I have two butons for starting new record in FE, and would like that when I press that button it would open form for FE writing, it would copy the ID valu of current record into FE, where it would be secondary key - for relation.

    Hwen I press button for RE it would be same as for FE just that it would also show me all FE records for the current person so that I could select the wright "first event" that the"reevent" is dependant on.

    Is that too complicated? or too copmlicated asked?

    Thanks for all help, Klemen

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    It sounds like you want:

    Forms!NewFormName.ControlName = Me.ControlName

    Substituting your names of course. If the new form isn't set to data entry, you'll probably want to open it in that mode. You might also consider using a subform instead of a standalone form, where the master/child links will take care of this type of thing automatically.

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    Wouldn't it be way easier to just have EVENTS and use a subform?

    First is a criteria... surely?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Jan 2007
    Provided Answers: 10
    Why have you split events in to two tables?
    Home | Blog

Posting Permissions

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