William Benson (VBACreations.Com)
vbacreations at gmail.com
Sun Oct 23 21:17:19 CDT 2011
Accdb database, I am not too familiar with Ac2010. ... especially how Access creates embedded events and actions instead of normal vba code to handle standard record operations on a buttonclick such as New Record. So I am trying to use VBA. When I create a new record in the table, I want to validate that the info entered is not already in the table. I could probably do this in the BeforeInsert, but I am instead doing it on the button click. If the record is one which may be added I want to insert a record. I am doing this presently by setting a dao recordset equal to the form's recordsetclone, and then saying Rst.AddNew, and then populating a few fields which are not bound to controls, then using bookmark to bring the rest of the form (and the bound controls) up to date and position the form on the correct record. That part is clunky but working, but the problem is that the Current event is not firing. For that matter, the Addnew is not firing either. I know I can call those events with code, but I was wondering why this method is not causing Current to fire on its own when I set the form's bookmark equal to the recordset's bookmark?