button invisible when focus ?

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

Hi all,

I have a button (save record) which has lines of code in
order to update all relevant tables. It works fine, but,
in a network environment, impatient people sometimes click
several times on it, so it generates a duplicate key error.
How can I make this button invisible, immediately after
the onclick event - it has the focus though ! - , so that
the code can work at ease and without generating any
unwanted duplicate key errors ?

Thanks for your answer,

Wim
 
Wim said:
I have a button (save record) which has lines of code in
order to update all relevant tables. It works fine, but,
in a network environment, impatient people sometimes click
several times on it, so it generates a duplicate key error.
How can I make this button invisible, immediately after
the onclick event - it has the focus though ! - , so that
the code can work at ease and without generating any
unwanted duplicate key errors ?

Just set the focus to a different control.

Consider disabling the button instead of making it
invisible.
 
-----Original Message-----
Hi all,

I have a button (save record) which has lines of code in
order to update all relevant tables. It works fine, but,
in a network environment, impatient people sometimes click
several times on it, so it generates a duplicate key error.
How can I make this button invisible, immediately after
the onclick event - it has the focus though ! - , so that
the code can work at ease and without generating any
unwanted duplicate key errors ?

Thanks for your answer,

Wim
.

Reply,

Don't know about making it invisable but how about this
for a solultion.

In the first line of your code try to open another form
or msg box and give them a few buttons to press that do
absolutly nothing and when the system has written all the
files give then back control saying all records written.

Hope this helps

Regards & good luck

Ian
 
Back
Top