[AccessD] Lose Focus

John B. john at winhaven.net
Wed Sep 17 08:34:02 CDT 2003


Hi David:
I can place "DoCmd.RunCommand acCmdSaveRecord" in an appropriate event
procedure such as After_Update and it saves the record. My problem is that I
don't want to force a save unless the function (on the shortcut menu) is
called. I can't seem to effectively trap the "right click" which calls the
shortcut menu.

I've come up with two alternatives to actually trapping the keystroke or
directly referencing the form:
1. use a command button to do the exact same thing and add the save command
in its procedure
2. use a global variable/function to store the name of the form. Neither
solution is optimal for the situation.

John B.


> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of David Fenton
> Sent: Wednesday, September 17, 2003 8:03 AM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Lose Focus
>
>
> I've had a similar problem with the save record before it can be used.
>
> I solved it by putting an
>
> If me.dirty then me.dirty=false
>
> into the opening lines of every event the user would be likely to
> activate
> (which was only three) where I needed the record, they were
> working on, to
> be saved first.
> It worked beautifully.
>
> Surely it can't be this simple?
>
> HTH,
>
> David
> Brisbane
> Australia
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>




More information about the AccessD mailing list