Visible Property and Continuous Form

  • Thread starter David Dubroff of Mr. PC
  • Start date
D

David Dubroff of Mr. PC

Question regarding MS Access 2000:

I have a continuous form as a sub-form. On this sub-
form, I have an option group to select a method for
charging labor as either hourly or flat-rate. Based upon
hourly or flat-rate, I am hiding and un-hiding the
appropriate fields accordingly.

If one record is hourly and another record is flat-rate,
I am not able to have each row hide and un-hide the
correct fields.

How can I get each line within the continuous form to
reflect the choice selected within the option group on
that row?
 
D

David Dubroff of Mr. PC

Hourly-rate entries need to use the following fields:
Num_of_Workers, Num_of_Hours, Hourly_Rate, Total_Dollars
Total_Dollars is calculated here by multiplying the first three fields.

Flat-rate entries need only one field:
Total_Dollars


On a continuous form, if the first entry uses flat-rate, just the total
dollars field is visible.
If the second entry on the same form is hourly-rate, all of the fields
become visible, even on the flat-rate entry.

Is there any way to have each row only display the fields that relate to
hourly vs. flat-rate, based upon the selection on each row for hourly vs.
flat-rate?

I have an option group to select hourly (value=1) vs. flat-rate (value=2).
 
A

Allen Browne

Access cannot hide different things on different rows of a continuous form
or datasheet.

You can use Conditional Formatting to change the look of the fields
depending on the data in other fields on that row, but you cannot hide the
controls.
 
D

David Dubroff of Mr. PC

Allen...

Thanks for your response thus far.

In my case, what do you suggest I do?

If the current focus is on a row for "hourly-rate", I want to lock the
"Total_Dollars" field. On a row for "flat-rate", I want to have only one
field unlocked "Total_Dollars" with the other three fields locked.

I need to idiot-proof the data entry within this sub-form, while still
allowing for the differences between hourly and flat-rate labor billing.

Please advise...
Dave
 
D

David Dubroff of Mr. PC

Perhaps I could cycle through the entire recordset on the sub-form and do as
follows:

Lock and unlock all fields accordingly on each row

To pseudo-hide the unwanted fields on each row, I could change the
foreground and background colors of the unwanted fields to blend with the
form background so these unwanted fields would appear to be invisible.

How do I cycle through the sub-form records and perform the above tasks
automatically?
 
D

David Dubroff of Mr. PC

Allen...

I found a sample database regarding conditional formatting.
(http://www.lebans.com/conditionalformatting.htm)

I looked at the sample database and I think I want to use a complex module
to apply conditional formatting. When the form is first loaded, I want to
pseudo-hide all of the fields accordingly within the sub-form. However, I
seriously lack the programming skills to follow the sample code of the
modules and forms to make everything happen within my file.

I suppose I will have to live without the sophisticated level of
idiot-proofing I know I want to have.

Bye for now...
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top