Perform an action when leaving a record...

  • Thread starter Thread starter Bill Mitchell
  • Start date Start date
B

Bill Mitchell

Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.
 
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post. Until I
read your "P.S." I was going to give you some much more complex suggestions
for creating mimicking a "BeforeNextRecord" event. For other purposes, I
have required the ability to detect record navigation before it occurs and
have found a couple of solutions. For your purpose, conditional formatting
really is the best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for some
reason it was removed - too bad!
 
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post. Until I
read your "P.S." I was going to give you some much more complex suggestions
for creating mimicking a "BeforeNextRecord" event. For other purposes, I
have required the ability to detect record navigation before it occurs and
have found a couple of solutions. For your purpose, conditional formatting
really is the best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for some
reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.
 
No - I don't know a way to alphabetize shortcut menus while customizing.

I rarely use the Access supplied interface for modifying toolbars - at least
not where my custom toolbars are concerned. Instead I have two local tables
in my application, Toolbars and ToolbarItems and I have a procedure that
builds the toolbars based on info in the tables. I don't recall the exact
reason for doing this but it is has made toolbar customizations much easier.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post.
Until I read your "P.S." I was going to give you some much more
complex suggestions for creating mimicking a "BeforeNextRecord"
event. For other purposes, I have required the ability to detect
record navigation before it occurs and have found a couple of
solutions. For your purpose, conditional formatting really is the
best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for
some reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.
 
Feel like sharing that nifty little procedure with me?

Bill
-----Original Message-----
No - I don't know a way to alphabetize shortcut menus while customizing.

I rarely use the Access supplied interface for modifying toolbars - at least
not where my custom toolbars are concerned. Instead I have two local tables
in my application, Toolbars and ToolbarItems and I have a procedure that
builds the toolbars based on info in the tables. I don't recall the exact
reason for doing this but it is has made toolbar customizations much easier.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post.
Until I read your "P.S." I was going to give you some much more
complex suggestions for creating mimicking a "BeforeNextRecord"
event. For other purposes, I have required the ability to detect
record navigation before it occurs and have found a couple of
solutions. For your purpose, conditional formatting really is the
best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for
some reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill Mitchell wrote:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.

.
 
Sure - I'll pull it out into a sample database and post it on my website. It
might be a day or two but I'll let you know when it's there.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Feel like sharing that nifty little procedure with me?

Bill
-----Original Message-----
No - I don't know a way to alphabetize shortcut menus while
customizing.

I rarely use the Access supplied interface for modifying toolbars -
at least not where my custom toolbars are concerned. Instead I have
two local tables in my application, Toolbars and ToolbarItems and I
have a procedure that builds the toolbars based on info in the
tables. I don't recall the exact reason for doing this but it is has
made toolbar customizations much easier.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post.
Until I read your "P.S." I was going to give you some much more
complex suggestions for creating mimicking a "BeforeNextRecord"
event. For other purposes, I have required the ability to detect
record navigation before it occurs and have found a couple of
solutions. For your purpose, conditional formatting really is the
best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for
some reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this
newsgroup.


Bill Mitchell wrote:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.

.
 
Thanks so much, what is your website address? My email
is (e-mail address removed). Thanks again :)

Bill
-----Original Message-----
Sure - I'll pull it out into a sample database and post it on my website. It
might be a day or two but I'll let you know when it's there.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Feel like sharing that nifty little procedure with me?

Bill
-----Original Message-----
No - I don't know a way to alphabetize shortcut menus while
customizing.

I rarely use the Access supplied interface for modifying toolbars -
at least not where my custom toolbars are concerned. Instead I have
two local tables in my application, Toolbars and ToolbarItems and I
have a procedure that builds the toolbars based on info in the
tables. I don't recall the exact reason for doing this but it is has
made toolbar customizations much easier.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill Mitchell wrote:
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post.
Until I read your "P.S." I was going to give you some much more
complex suggestions for creating mimicking a "BeforeNextRecord"
event. For other purposes, I have required the ability to detect
record navigation before it occurs and have found a couple of
solutions. For your purpose, conditional formatting really is the
best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for
some reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this
newsgroup.


Bill Mitchell wrote:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.

.

.
 
Bill Mitchell said:
Thanks so much, what is your website address? My email
is [deleted] Thanks again :)

Oh, Bill, you're asking for trouble posting your e-mail address in the
newsgroup these days. Spammers an viruses both harvest e-mail addresses
from here. I stongly recommend you obfuscate your address when posting
to ensure that robots can't interpret it correctly.
 
Hi Bill,

It's ready now - take a look at http://www.daiglenet.com/MSAccess.htm - it's
the first sample on the page *CommandBars*. I played around with the UI for
it, hopefully it will make sense to you. I've always just worked out of the
tables but decided to clean it up a little. Comments are welcome!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Bill said:
Thanks so much, what is your website address? My email
is (e-mail address removed). Thanks again :)

Bill
-----Original Message-----
Sure - I'll pull it out into a sample database and post it on my
website. It might be a day or two but I'll let you know when it's there.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill said:
Feel like sharing that nifty little procedure with me?

Bill
-----Original Message-----
No - I don't know a way to alphabetize shortcut menus while
customizing.

I rarely use the Access supplied interface for modifying toolbars -
at least not where my custom toolbars are concerned. Instead I have
two local tables in my application, Toolbars and ToolbarItems and I
have a procedure that builds the toolbars based on info in the
tables. I don't recall the exact reason for doing this but it is has
made toolbar customizations much easier.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Bill Mitchell wrote:
Yes, unfortunately MS leaves lots of REALLY useful things
out. The reasons I am sure make sense only to them.
Maybe so we can get frustrated and have to pay $200 and
hour for their technical support? That's my guess.

There are just too many common sense things
like "BeforeNextRecord" left out to be any other reason.
I think it's stuff like this that makes MS such a target
and why entire countries like China (ouch) are going with
Linux instead.

NEW QUESTION:
Oh well. Hey, do you know of some way I can make my
SHORTCUT MENUS appear in ALPHABETICAL ORDER when I am
customizing them? From what I can tell they are in no
order at all. I have hundreds so making changes is a
MAJOR PAIN because it takes me 5 minutes to find the one
I want (since they are in no order). This is just one
more thing about Access that really pushes my buttons
sometimes.

Sorry to rant but it just gets to me after a while.
-----Original Message-----
Cheryl beat me to it . . . :-)

So instead I'll wanted to congratulate you for an effective post.
Until I read your "P.S." I was going to give you some much more
complex suggestions for creating mimicking
a "BeforeNextRecord"
event. For other purposes, I have required the ability to detect
record navigation before it occurs and have found a couple of
solutions. For your purpose, conditional formatting really is the
best option.

FWIW, there was almost a "BeforeNextRecord" event in A2002 but for
some reason it was removed - too bad!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this
newsgroup.


Bill Mitchell wrote:
Hi,

I need some code that will perform an action when leaving
one record on a continuous form and going to another.

I know how to us the OnCurrent method to make something
happen on the record I am moving to, but how do I make
something happen on the record I am leaving?

For instance, if I have a checkbox
called "RecordFocus"
and I want that box to be checked when a record has the
focus and uncheck when the record loses the focus, how
would I do that? "RecordFocus" is linked to a field on
the underlying table so it doesnt take on the same value
for all records.

I've tried using GotFocus et al on the form itself, but I
don't think that works in Access.

Any hep out there? Much appreciated.

P.S., Why would I want to do this? I hate the little
Access Record Selector arrows. They are too big and make
my forms look messy when i have multiple subforms
showing. I want to get rid of those, but still show
which record has the focus on a continuous form.

Thanks.

.

.

.
 
Back
Top