what event is navigate?

  • Thread starter Thread starter mcnewsxp
  • Start date Start date
M

mcnewsxp

what event can i use to trap navigation on a form.
my form opens to a new record, but users do not always want to save the new
record and simply want to naviagate so i have to either remove the record or
prevent it from being written.

please do not respond with anything that suggests i change the way the users
have been using this for several years. just be nice and anwer the
question.

TIA,
mcnewsxp
 
mcnewsxp said:
what event can i use to trap navigation on a form.
my form opens to a new record, but users do not always want to save the new
record and simply want to naviagate so i have to either remove the record or
prevent it from being written.

please do not respond with anything that suggests i change the way the users
have been using this for several years. just be nice and anwer the question.

Unless you are setting a value in code or with a macro just "arriving at the new
record" does not "create a new record". Your users should be able to just
navigate off that position without doing anything.

If you are automatically setting a value then you just need to remove that.
 
what event can i use to trap navigation on a form.
Unless you are setting a value in code or with a macro just "arriving at
the new record" does not "create a new record". Your users should be able
to just navigate off that position without doing anything.

If you are automatically setting a value then you just need to remove
that.

what event can i use to trap navigation on a form - besides on current,
after/before update/insert?
can i trap the navigation buttons?
 
mcnewsxp said:
what event can i use to trap navigation on a form - besides on current,
after/before update/insert?
can i trap the navigation buttons?

No. If you need an event that fires _before_ you leave a record you need to
disable every standard method of navigation and then provide your own buttons
and methods to replace them. This means disabling menus and toolbars, trapping
keystrokes, etc.. It's really quite a PITA to catch all of them.

If you don't mind doing so (I certainly would) you can intentionally dirty every
record as it is navigated to by setting some field equal to itself. This allows
you to use the BeforeUpdate event because any action that takes you away from
the record will initiate a Save on the record first.
 
what event can i use to trap navigation on a form.
No. If you need an event that fires _before_ you leave a record you need
to disable every standard method of navigation and then provide your own
buttons and methods to replace them. This means disabling menus and
toolbars, trapping keystrokes, etc.. It's really quite a PITA to catch
all of them.

If you don't mind doing so (I certainly would) you can intentionally dirty
every record as it is navigated to by setting some field equal to itself.
This allows you to use the BeforeUpdate event because any action that
takes you away from the record will initiate a Save on the record first.

afraid of that.
i have a way to delete the record if the usr does not save, but if they
navigate back to that deleted rcord they see #DELETED in all the fields.
any way to move past that to a new record without getting stuck.
 
mcnewsxp said:
afraid of that.
i have a way to delete the record if the usr does not save, but if they
navigate back to that deleted rcord they see #DELETED in all the fields. any
way to move past that to a new record without getting stuck.

I suppose you could issue a Requery of the form followed by a command to take
you to a new record.
 
afraid of that.
i have a way to delete the record if the usr does not save, but if they
navigate back to that deleted rcord they see #DELETED in all the fields.
any way to move past that to a new record without getting stuck.

If the user navigates off the new record without doing anything, then the
record is NOT added, and therefore you do NOT need to delete record.
 
Back
Top