i have main form and sub form
the sub form = allowaddition = no
I want to put button on main form to add record to the sub from ..
I would use a separate edit screen that would pop up when someone
clicks on the command button. I would not use the traditional Access
methods. Instead I would use VBA to create a series of functions to
1) copy the data from the selected record in the table to memory
variables, 2) copy the memory variables to textboxes on the screen, 3)
copy the data from the textboxes back to the memory variables, and 4)
copy the data in the memory variables back to the original record in
the original table. When the user pressed the Save button on the edit
screen, it would call functions 3 and 4, refresh the subform on the
main form, and close the window in which it resides. For examples on
making these functions using VBA, search the use net for "OldPro" and
"ReadRecord".
Using VBA is one way to get around some of the unwanted behaviors of
Access traditional methods. One example in pariticular of an
unwelcome Access behavior, is that records are saved when the user
navigates off of a record, whether the user intends to or not.
Depending on the version, there are other gotchas that must be
handled, and thus prolong the time it takes to create a stable
application.