Results 1 to 2 of 2
  1. #1
    Nchostel is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2014
    Posts
    1

    Automatic update of a field from another form

    Hi all,



    Apologies if I am asking for something already discussed, but I am going through posts for hours now and can’t find anything that will resolve my problem. I am working on a database where I have basically two tables:

    a) Loss Events
    b) Action plans

    I want to have one to many relationship i.e. for every loss event I want to have one or more action plans. Obviously there are LossEventIDs and ActionPlansIDs and obviously the action plans table has a column with LossEventID. I also created a one to many relationship.

    the problem

    My database is built in a way that I can only add new action plans to events already saved on my data base. So I have a form that displays all the information about an event and I can navigate through all entries in events table. Now I want to add an action plan to a particular event. So I have a button, I click “add new action plan”, this bring me to “add new action plan” form. The add new action plan form has one field which I want to be automatically populated, this field is the ID of the loss event from which I navigated to this form.

    In other words I want access to understand that since I navigated to the “add new action plan” form, from the event ID “1”, then the “event ID 1” field on the “add new action plan” form shall be prepopulated with value 1. And the action plan table shall be updated accordingly.



    Anyone who faced that situation???

    many thanks in advance,
    Nikos

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One way right after opening the form:

    DoCmd.OpenForm...
    Forms!NewFormName.EventIDField = Me.EventIDField
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. field (automatic number) in form
    By azhar2006 in forum Forms
    Replies: 1
    Last Post: 01-26-2014, 04:14 PM
  2. Replies: 3
    Last Post: 09-13-2012, 08:18 AM
  3. Automatic Update Feature of Forms?
    By mkc80 in forum Access
    Replies: 2
    Last Post: 05-18-2012, 08:10 AM
  4. Automatic form field fill in
    By tsn.s in forum Access
    Replies: 4
    Last Post: 11-07-2011, 01:21 PM
  5. Replies: 2
    Last Post: 05-05-2010, 02:52 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