Disable button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a "LOAD" button on my form that I would like to
disable once the user has loaded the data for the day
until next day. Could someone help me acheive this.

Thanks
 
hi,

Me.button.enabled = false ' grays out the button.
on form open
me.button.enable = true
or
me.button.visible = false 'make the button disappear
on form open
me.button.visable = ture ' makes the button appear
 
To disable and make your button invisible, set the Enabled
and Visible properties to False:

Me![yourcmdbutton].Enabled = False
Me![yourcmdbutton].Visible = False

The question is by what criteria you determine whether the
data has been loaded for that day.

One possibility is that whatever event you're using to
complete the loading of that day's data, you set a field
named, e.g., LastLoadedDate, to the current date. Then
you could set the Enabled and Visible properties in the
form's On Load event by comparing LastLoadedDate to the
current date.

If this doesn't seem feasible, please post more detail
about your table structure(s), and I'll try again.

HTH
Kevin Sprinkel
 
Thankyou much!! That was very helpful.
-----Original Message-----
To disable and make your button invisible, set the Enabled
and Visible properties to False:

Me![yourcmdbutton].Enabled = False
Me![yourcmdbutton].Visible = False

The question is by what criteria you determine whether the
data has been loaded for that day.

One possibility is that whatever event you're using to
complete the loading of that day's data, you set a field
named, e.g., LastLoadedDate, to the current date. Then
you could set the Enabled and Visible properties in the
form's On Load event by comparing LastLoadedDate to the
current date.

If this doesn't seem feasible, please post more detail
about your table structure(s), and I'll try again.

HTH
Kevin Sprinkel
-----Original Message-----
I have a "LOAD" button on my form that I would like to
disable once the user has loaded the data for the day
until next day. Could someone help me acheive this.

Thanks
.
.
 
Back
Top