Update table via pop up forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy

    #1

    Update table via pop up forms

    I use a A2000 application.I use a Dataentry form to update few
    tables.This form has subforms to populate the related tables.Recently
    we added two new tables.Let's call table1 and table2.While table 1 is
    linked to the maintable with a EvID field,it is linked to the table2 by
    a field TaID.Since the space in the main dataentry form was not
    sufficient,i decided to use a pop up form with a subform to accomodate
    the table 1 and table2.I open the pop up form with the criteria of
    related EvID.

    When I try to enter data in the pop up form,it comes with a error
    saying,related entry not found in the Main table.How do i solve this

    Thanks for your help,

    Roy

  • pietlinden@hotmail.com

    #2
    Re: Update table via pop up forms

    Did you set the value of the parent's record ID in your code? If it's
    a popup form, there's no linking going on behind the scenes.
    (LinkChild/Linkmaster properties). So you have to copy the parent's
    record ID into the child form. Otherwise, when you try to save the
    record, it will be missing the foreign key for RI.

    Comment

    • Roy

      #3
      Re: Update table via pop up forms

      Thanks for the reply.Let me explain further.The parentID of the master
      form is a autonumber.The number gets generated.How would I set the
      value of the parentID?I tried to work around this by using a Dmax
      function and then passing this value.But I don't know how to copy this
      value to the child?On the main form of the pop up,after the tabbing the
      last control,it comes with the error saying,"no related entry found".



      pietlinden@hotm ail.com wrote:
      Did you set the value of the parent's record ID in your code? If it's
      a popup form, there's no linking going on behind the scenes.
      (LinkChild/Linkmaster properties). So you have to copy the parent's
      record ID into the child form. Otherwise, when you try to save the
      record, it will be missing the foreign key for RI.

      Comment

      Working...