DB w/SQL backend - CURRENT event not firing

D

Dennis

Okay, I'm not even sure I can frame this issue properly, so please bear with
me. I have an Access2003 database with a SQL backend. Fine. I have a tabbed
form, where one of the tabs contains a bound subform. Also fine, and works
perfectly. I have a Form_Current event for the subform that fires properly
when the user is walking through existing records. Now for the issue:

With an Access backend and with the standard record navigation buttons
shown, the ADD NEW RECORD button is always available for the user to click.
This is not always the case with a SQL backend. If there are NO records in
the subform's bound table, the ADD NEW button is greyed out. When the user
starts typing, a new record is "pending", and the user can finish data entry,
click the little pencil, and post the record. However, the Form_Current event
doesn't fire.

I have some code inside that event to lock or unlock certain controls based
on the user's "security capability" (something designed into the
application). If that event doesn't fire, the code doesn't execute, and the
controls stay locked. Once a record IS in the table, the ADD NEW button is no
longer greyed out, and clicking it DOES trigger the Form_Current event. (I
have code in there checking the "Me.NewRecord" property.)

My question is: How can I get that event to fire, OR, what event can I use
to unlock those controls? I know I can use Form_Dirty, but then that code is
looped through every time a keystroke is entered, and I'd rather avoid that
if possible.

All that being said, does someone out there have an idea as to how I can
make this work correctly? I'd sure appreciate it.

Thanks!

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top