Make current record next conditionally formatted row

  • Thread starter Thread starter Ray V
  • Start date Start date
R

Ray V

I use conditional cell formatting in a datasheet to indicate items of
interest. If there are many rows, it is time consuming to locate the next
row of interest. I want to add logic to advance to the next highlighted row
using a PF key. How do I determine if a row was conditionally formatted?
(.BackColor attribute doesn't change in a conditionally formatted row)
 
Why would you not just do all this in Excel? It sounds like that'd be more
in-line with your needs anyway.
 
Okay, so why not generate a report with the "items of interst" highlighted
that way? It'd be a whole lot easier to do. I guess my questions center
around the fact that not many people use datasheet view as a main component
of an Access application.
 
"not many people use datasheet view as a main component of an Access
application"

Really? Where did you get such an absurd idea? I don't know of an
application I have written or seen in the last 10 years that doesn't make
extensive use of datasheet forms.
Perhaps you just don't know very much about Access.
 
That may well be true. Another possibility is that people who use datasheet
views are uncomfortable with Access and feel more at home using an Excel-like
interface.

JMHO - YMMV
 
Dennis,
I don't know your background at all, but when it comes to Access and
database application design, you don't have a clue. Perhaps you should stay
in the Excel groups. You certainly don't have the knowledge, expericend or
technical ability to be of any use here.
For one thing, datasheets are commonly used as subforms to show the many
side of a one to many data relationship. But perhaps since you only know
Excel, you don't understand relational data.
 
Well, since I don't know Excel at all (nor care to) and only have 35 years of
hard-core database design in my past (as well as cutting-edge applications in
automated data-collection and robotic programming), I guess I'd better keep
quiet. Because us old farts need to make room for the ignorant, arrogant
script-kiddies...
 
Ray,
It appears my original response did not get posted. There is a way you can
do this.
The issue is that the cell formatting is a property of the form. You can't
directly detemine what the cell format will be by looking at the value of the
field. But, that doesn't keep you from being able to use the same criteria
to find the next record that meets the criterai you use to set the
conditional formatting.

Since you form is in datasheet view, you wont be able to use a command
button to do the search, but what I would suggest would be to use the Double
Click event of the control that the field you are formatting is bound to. In
the event, you can search for the next record matching the criteria you use
in the conditional formatting. Here is an example:

Dim strCriteria As String

strCriteria = 'Use whatever you use to do the conditional formatting

With Me.RecordsetClone
.FindNext "[FieldToSearch] = " & strCriteria
If .NoMatch Then
MsgBox "No Matching Records Found"
Else
Me.Bookmark = .Bookmark
End If
End With

That is a bit simplified, but it should give you a starting point. Please
post back if you need additional assistance.
 
Looks like we have been at this for about the same length of time. I know
nothing about robotics, but I did do one automated data collection
application. I am sure robotics programming is a complex environment. All
my experience has been in user oriented applications developement and
relational database design. I don't even know any script-kiddies.
If you know nothing about Excel or Access, why are you even making
nonsensical comments on a subject you know nothing about?
My less that pleasant response has nothing to do with arrogance and being an
Access MVP, certainly not ignorance, but was because of your dismissive,
ill-informed assertians that will do more harm to a poster seeking help than
any good that may come from it.
 
Back
Top