ACC1x: Setting Form's Dynaset Property Puts Bookmark at EOF

ID: Q90850


The information in this article applies to:


SUMMARY

In Access Basic, you can make a copy of the dynaset that a form may currently be using for data manipulation.

The syntax to accomplish this is:


   Dim MyDB as Database
   Dim MyDyn as Dynaset
   Set MyDB = OpenDatabase("NWIND.MDB")
   Set MyDyn = Forms!Categories.Dynaset 


In this case, you may assume that the bookmark is at the beginning of the Categories dynaset. However, the bookmark is at the end-of-file (EOF) marker. In fact, after a variable is set to the dynaset of a form, there is no current record because the bookmark is actually at the EOF marker.


MORE INFORMATION

Before doing any further actions, the two dynasets should either be synchronized or the bookmark should be set to the first record. This is done with the following statement:


   MyDyn.Bookmark = Forms!Categories.Bookmark  ' Synch dynasets.

   -or-

   MyDyn.MoveFirst   ' Move to first record. 


After one of these statements has been issued, there will be a current record and the bookmark will be pointing at this current record.


REFERENCES

Microsoft Access "Introduction to Programming," version 1.0, Chapter 8


Keywords          : kbprg PgmObj 
Version           : 1.0 1.10
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: March 11, 1999