Subform retains data when going to new rec via coded rtn 
Author Message
 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



Tue, 05 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Perform a go to new rec w/ retaining some info from prev rec

2. New Rec with Data Based on Previous Rec's Data

3. A97: Go to new rec in 2nd level subform

4. New Rec with previous Rec data

5. New Rec with previous Rec data

6. Refreshing subform data when new subform records inserted by code behind the main form

7. Move to newrecord adds rec to db, but cant move to new rec

8. Problem with adding new rec with form containing a subform

9. Form Coding Problem for New Rec

10. subform retains old data


 
Powered by phpBB® Forum Software © phpBB Group