Continuous form and saving record

thart21

Registered User.
Local time
Today, 13:11
Joined
Jun 18, 2002
Messages
236
I can't get this to work properly. I have a main form with a cmd button that opens a pop up form (continuous) titled "Notes" and shows the notes for the current record.

Private Sub Command322_Click()
On Error GoTo Err_Command322_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Notes"

stLinkCriteria = "[ProjectDetailsID]=" & Me![projectid]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd


Exit_Command322_Click:
Exit Sub

Err_Command322_Click:
MsgBox Err.description
Resume Exit_Command322_Click

End Sub

On the Notes form I have a cmd button "Done".
On Error GoTo Err_done_Click


DoCmd.Close

Exit_done_Click:
Exit Sub

Err_done_Click:
MsgBox Err.description
Resume Exit_done_Click

The problem is that, unless I move my cursor from the record I am typing in, it will not save. This is an extra step my user's shouldn't have to do and I thought that Access would save the record when I close out of the form anyway. I've also had to put the following in my After Update of the Notes form to get it to save.

Me.ProjectDetailsID = Forms!Projects!projectid

Any ideas would be appreciated.
 
Have a look at the sample, it this what you want?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom