Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

form not updating table

Discussion in 'Information Technology' started by Loni - RWT, Jul 28, 2006.

  1. Loni - RWT

    Loni - RWT
    Expand Collapse
    Guest

    I have a form based directly on a details table. The underlying table
    contains an autonumber PK, date, equip number, odometer, and FK's to other
    related tables. A command button on this form opens another appropriate form
    based on another table and links the appropriate fields. I enter data into
    the first form then click the button to open the appropriate second form,
    enter data there and exit out of both forms. When I check the underlying
    tables, the second table is updated, but the first is not. I have looked at
    all the field properties etc of both forms and tables and cannot see any
    difference. Can anyone offer any suggestions as to what I may have missed?
    Thanks.
     
  2. Loading...


  3. strive4peace

    strive4peace
    Expand Collapse
    Guest

    Hi Loni,

    try this:

    in the code for the command button that opens the other
    form, first save the record you are on:

    if me.dirty then me.dirty = false

    if this does not work, perhaps there is a required field
    that is missing or a field necessary for a relationship that
    is not filled out. Make sure the DefaultValue of any FK
    (table design) that you may not necessarily fill is set to
    null, not 0, so that referential integrity can be enforced
    on the relationship.

    Warm Regards,
    Crystal
    Microsoft Access MVP 2006

    *
    Have an awesome day ;)

    remote programming and training
    strive4peace2006 at yahoo.com

    *

    Loni - RWT wrote:
    > I have a form based directly on a details table. The underlying table
    > contains an autonumber PK, date, equip number, odometer, and FK's to other
    > related tables. A command button on this form opens another appropriate form
    > based on another table and links the appropriate fields. I enter data into
    > the first form then click the button to open the appropriate second form,
    > enter data there and exit out of both forms. When I check the underlying
    > tables, the second table is updated, but the first is not. I have looked at
    > all the field properties etc of both forms and tables and cannot see any
    > difference. Can anyone offer any suggestions as to what I may have missed?
    > Thanks.
     
  4. Loni - RWT

    Loni - RWT
    Expand Collapse
    Guest

    Thanks for your help! I found the FK's had 0 for the Default Value so I
    deleted them and that corrected the problem.

    "strive4peace" <"strive4peace2006 at yaho" wrote:

    > Hi Loni,
    >
    > try this:
    >
    > in the code for the command button that opens the other
    > form, first save the record you are on:
    >
    > if me.dirty then me.dirty = false
    >
    > if this does not work, perhaps there is a required field
    > that is missing or a field necessary for a relationship that
    > is not filled out. Make sure the DefaultValue of any FK
    > (table design) that you may not necessarily fill is set to
    > null, not 0, so that referential integrity can be enforced
    > on the relationship.
    >
    > Warm Regards,
    > Crystal
    > Microsoft Access MVP 2006
    >
    > *
    > Have an awesome day ;)
    >
    > remote programming and training
    > strive4peace2006 at yahoo.com
    >
    > *
    >
    > Loni - RWT wrote:
    > > I have a form based directly on a details table. The underlying table
    > > contains an autonumber PK, date, equip number, odometer, and FK's to other
    > > related tables. A command button on this form opens another appropriate form
    > > based on another table and links the appropriate fields. I enter data into
    > > the first form then click the button to open the appropriate second form,
    > > enter data there and exit out of both forms. When I check the underlying
    > > tables, the second table is updated, but the first is not. I have looked at
    > > all the field properties etc of both forms and tables and cannot see any
    > > difference. Can anyone offer any suggestions as to what I may have missed?
    > > Thanks.

    >
     
  5. strive4peace

    strive4peace
    Expand Collapse
    Guest

    you're welcome, Loni :) happy to help

    Warm Regards,
    Crystal
    Microsoft Access MVP 2006

    *
    Have an awesome day ;)

    remote programming and training
    strive4peace2006 at yahoo.com

    *

    Loni - RWT wrote:
    > Thanks for your help! I found the FK's had 0 for the Default Value so I
    > deleted them and that corrected the problem.
    >
    > "strive4peace" <"strive4peace2006 at yaho" wrote:
    >
    >
    >>Hi Loni,
    >>
    >>try this:
    >>
    >>in the code for the command button that opens the other
    >>form, first save the record you are on:
    >>
    >>if me.dirty then me.dirty = false
    >>
    >>if this does not work, perhaps there is a required field
    >>that is missing or a field necessary for a relationship that
    >>is not filled out. Make sure the DefaultValue of any FK
    >>(table design) that you may not necessarily fill is set to
    >>null, not 0, so that referential integrity can be enforced
    >>on the relationship.
    >>
    >>Warm Regards,
    >>Crystal
    >>Microsoft Access MVP 2006
    >>
    >> *
    >> Have an awesome day ;)
    >>
    >> remote programming and training
    >> strive4peace2006 at yahoo.com
    >>
    >> *
    >>
    >>Loni - RWT wrote:
    >>
    >>>I have a form based directly on a details table. The underlying table
    >>>contains an autonumber PK, date, equip number, odometer, and FK's to other
    >>>related tables. A command button on this form opens another appropriate form
    >>>based on another table and links the appropriate fields. I enter data into
    >>>the first form then click the button to open the appropriate second form,
    >>>enter data there and exit out of both forms. When I check the underlying
    >>>tables, the second table is updated, but the first is not. I have looked at
    >>>all the field properties etc of both forms and tables and cannot see any
    >>>difference. Can anyone offer any suggestions as to what I may have missed?
    >>>Thanks.

    >>
     

Share This Page