
Subform retains data when going to new rec via coded rtn
This appears to be a bug in Access 97.
I created a toolbar button which calls a module routine to go to a new
record. When I press the button, I go to a new record but my subform
retains the data from the previous record I was on (the subform should be
blank). The main form and subform are properly linked and going to a new
record works fine using any of the regular methods. My routine is very
basic and looks like this:
If (Not Screen.ActiveForm.NewRecord) Then
' NEITHER OF THESE COMMANDS WORKED
' DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.GoToRecord acDataForm, Screen.ActiveForm.Name, acNewRec
End If
I've tried adding repaint and refresh commands to the end of this routine
as an attempt to "clear" the subform data but nothing has worked.
Any insight on this problem would be greatly appreciated.
--
Mark Dosen