Hiding a Control on a Subform based on subform data

  • Thread starter Thread starter jonathan
  • Start date Start date
J

jonathan

Hi Y'all,

I have a subform that lists all of the tasks that need to be complete
for a certain account. I have a button on the subform name "Complete",
when that if pressed it will populated the "Completed Date" field with
the a timestamp.

I only want to have the "Complete" button control to be visable is the
"Completed Date" is blank for that particular task?

Is there a way to do that with Access '97?

Thanks in advance for your help!

-- jonathan
 
That almost works. The problem is that it seems to be all or nothing.


Lets say that there are 2 task records displayed on the subform. The
first one has a date completed while the second one does not. When the
form loads BOTH subform records will be without the "Complete" Button

If I then select the second record, then BOTH subform records will then
have the "Complete" button.

What I want to happen is, no matter what sub form record is current,
that the first record will not have the button while the second record
will have the button.

Thanks again for your help,
Jonathan
 
Right, sub form, data sheet or continuous form, well, you are correct. It is
all or nothing.

An alternative is to put the completed button on the main form. It will
follow the currently selected record in sub form.
 
If you are currently using a datasheet, you may try changing it to a
continuous form. I am not really experienced with continuous forms, but I
think it may work there. Worth a shot, let me know and we both learn :)
 
Yeah -- I was using a continuous form. Couldn't get it to work. What
I did was made the button toggle the complete date. If the date was
populated it would set it to null and visa versa. That seemed to work
for our purposes.
 
yeah, that is the problem with datasheets and continuous controls. they are
a little harder to manipulate because of the contstraint on controls.
I understand why they are that way, but I wish they were not.
 
Back
Top