Save Record and Close Window

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

Guest

I have a form that launches a subform upon clicking a button. On the
subform, one value is entered and a button clicked to save and close the
subform. For some reason it's not saving my data. Here's the code used.

Private Sub Command124_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
End Sub
 
What is your data source for the subform? what are the fields for that
data source? The record should save automatically without the code.

-doodle
 
zachnjoe said:
I have a form that launches a subform upon clicking a button. On the
subform, one value is entered and a button clicked to save and close
the subform. For some reason it's not saving my data. Here's the
code used.

Private Sub Command124_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
End Sub

It should save IF there tables are updateable. Relationships sometimes
will prevent updating do to logical restraints.
 
When the form is launched, I use the function Dmax to increment the last
number saved plus one. The form launches fine and the number increments but
does not save to the table. The table has no relationships with any other
table or forms of my database.
 
Back
Top