commit changes

  • Thread starter Thread starter Sanjin Vidlanovic
  • Start date Start date
S

Sanjin Vidlanovic

I have two forms Form1 and Form2. Form1 has record source Table1, Form2 has
record source Table2.
Table2 has foreign key (key of Table1).

Form1 has a button that opens Form2.

I'd like to commit changes made on Form1 before opening Form2. I can do it
by closing and reopening of Form1, but I'm sure there's better way (requery
just saves data and leaves me with a blank form)


Thx, Sanjin
 
Hi

Before the code that opens Form2, add the code:-

if me.dirty then me.dirty = false


hth

Chris
 
You could possibly use the following line of code just before the command to
open Form2

DoCmd.RunCommand acCmdSaveRecord
 
Chris Large said:
Hi

Before the code that opens Form2, add the code:-

if me.dirty then me.dirty = false


hth

Chris

WOW! Great, that is what I needed. Thx
 
Cheryl Fischer said:
You could possibly use the following line of code just before the command to
open Form2

DoCmd.RunCommand acCmdSaveRecord


This works too. Thx!
 
Back
Top