Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent OnEnter of subform from adding the record on the main form

Status
Not open for further replies.

tekila

Programmer
Apr 18, 2002
150
0
0
SG
Both my subform and main form are linked to the same table. On the main form, there is a Add button that saves a record but if the user fills in all the entries in the main form but did not hit Add button,instead sets focus to the subform, the record is saved. How can I prevent the saving of the record in OnEnter of subform?
 
If you still want to retain the data you can't .. ..

unless you UNBIND all of the controls on the main form and populate then / update then using Recordsets.


G LS
 
I don't quite get what you mean but what I did was to use a list box instead of a subform. In this way, whatever I do to the list box has no effect on the main form. Can't think of a better solution...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top