Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data in Mainform and Subform

0 views
Skip to first unread message

Beeyen

unread,
Apr 20, 2009, 1:19:03 PM4/20/09
to
Good Day,

I have a mainform and subform with tabs. Whenever I enter information into
a field in the mainform and then go to a tab in the subform I receive a ‘Save
Record” message (the coding is located below). When I select ‘No’ the input
on the mainform disappears and the field in the subform I am trying to select
to include information with the record becomes active. If I select yes to
save the record is not complete with the right choices and opens a new
record. The message just recently started appearing.

Has anyone experienced this and if, so can you share your resolve.

Thanks

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Workload Tracker Data has changed."
strMsg = strMsg & "@Would you like to save the changes?"
strMsg = strMsg & "@Click Yes to Save or No to Discard changes and exit
out."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo

'Created for WHI Benefits use by Michael Banks
End If
End Sub

GBA

unread,
Apr 20, 2009, 2:42:03 PM4/20/09
to

just off the cuff;

it asks you if you want to 'Save Record' - and when you select NO then it
does not...

which is the way it is written by Michael Banks

what is the question??

Beeyen

unread,
Apr 20, 2009, 4:50:01 PM4/20/09
to
Good Day GBA,

Thanks for the response. The problem is it tries to save without being able
to add the information from the Tabs in the Subforms and then creates a new
form.

Beeyen

unread,
Apr 21, 2009, 8:39:02 AM4/21/09
to
Good Day GBA,

Thanks for the quick response, but sorry for the inconvenience; the record
is doing what it is suppose to do as you mentioned. I completed the
mainform, accepted yes to save, entered information in the subform and it all
saved as one record.

Thanks

0 new messages