Buttons Go Inactive ... ???

L

LarryP

I have a form with four buttons in the form footer that (1) open a query, (2)
open another form, (3) delete some files from the user's c:\ drive, and (4)
close the current form. In a previous edition all these buttons have worked
fine for months and months. I'm now doing a redesign; the information
displayed in the detail area of my form outgrew the screen width, so I split
it and moved it into two separate tabs on a tab control. Did absolutely
nothing to the buttons, but now they act as if they've been disabled. Have
checked the code, deleted and re-created the buttons and their code with and
without the Wizard, renamed the buttons and then deleted and re-created the
code again, moved the buttons to the form header instead of the footer, and
everything else I could think of, all with no success. What's going on here?
 
C

Carl Rapson

Depends on what you mean by 'act as if they've been disabled'. Are the
controls disabled on the form, or can you click on them but nothing happens?
If the latter, then it's possible Access 'lost' the connection between the
controls and their Click events. Open the Properties window for each button,
click on the Event tab, make sure [Event Procedure] is specified, and click
the ellipse button on the right to open the Code window. If the code for the
event is still in the code module, this will re-establish the connection.

HTH,

Carl Rapson
 
L

LarryP

The latter. They aren't SET to disabled, but when they are clicked, nothing
happens. While waiting for a response I experimented further, and it appears
doing just about anything "brings them back to life," e.g., going to the
form's design view, then back to the form view, causes them to work again.
It's just when the form first opens that they seem to be disconnected in some
fashion from their code. I'm using an inelegant workaround for the present:
in the Form.Open event I immediately set it to invisible and back to visible.
That causes an additional "flicker," but at least the buttons work. Still
hope someone here can tell me what I did in redesigning my form that caused
this odd problem.

Carl Rapson said:
Depends on what you mean by 'act as if they've been disabled'. Are the
controls disabled on the form, or can you click on them but nothing happens?
If the latter, then it's possible Access 'lost' the connection between the
controls and their Click events. Open the Properties window for each button,
click on the Event tab, make sure [Event Procedure] is specified, and click
the ellipse button on the right to open the Code window. If the code for the
event is still in the code module, this will re-establish the connection.

HTH,

Carl Rapson

LarryP said:
I have a form with four buttons in the form footer that (1) open a query,
(2)
open another form, (3) delete some files from the user's c:\ drive, and
(4)
close the current form. In a previous edition all these buttons have
worked
fine for months and months. I'm now doing a redesign; the information
displayed in the detail area of my form outgrew the screen width, so I
split
it and moved it into two separate tabs on a tab control. Did absolutely
nothing to the buttons, but now they act as if they've been disabled.
Have
checked the code, deleted and re-created the buttons and their code with
and
without the Wizard, renamed the buttons and then deleted and re-created
the
code again, moved the buttons to the form header instead of the footer,
and
everything else I could think of, all with no success. What's going on
here?
 
Top