form not updating table

  • Thread starter Thread starter Guest
  • Start date Start date
G

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.
 
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

*
 
Thanks for your help! I found the FK's had 0 for the Default Value so I
deleted them and that corrected the problem.
 
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

*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top