VB Code for hiding/unhiding colored rows/columns???

M

McNiwram

Folks

Would anyone be so kind enough to suggest a code that
allows me to hide/unhide colored rows/columns/cells? My
idea is for a code that would work like...

If Row B.color='yellow' then Row B.visible=true
etc. etc.

Cheers mates
 
L

Larry Linson

"Rows/columns/cells" in what context? A form, a report, a datasheet view? In
Access VBA, there's no construct for addressing an entire row or an entire
column. And, strictly speaking, "cell" is spreadsheet terminology . . .
though we sometimes use "cell" to mean a particular field in a particular
record in a datasheet view.

Larry Linson
Microsoft Access MVP
 
M

McNiwram

If I color an entire row or column in
yellow/blue/whatever...I want to build a toggle button to
hide/unhide those rows or columns.

anyone else there who has a simple answer?
 
S

Stephen Lebans

There is no simple answer since you are going against the established
GUI. Within mainstream WIndows programs, controls not being used are
Disabled not removed from view. CF supports the control's Disabled
property.

You can use ConditionalFormatting in A2K or higher, with forms in
Continuous view to simulate a Visible prop but it's messy and quite
complicated. See:
http://www.lebans.com/conditionalformatting.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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