highlite a row

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

Guest

I have a table in form view with numerous records, how can i highlite the
whole row when selecting?


Diane
 
Hi Arvin,
that's an older Access 97 only solution. For A2K and higher see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet View

Version 2.7

Added sample demonstrating how to achieve a background Hover/Highlighting of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to based on a
Boolean(Yes/No) field.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub
 
Have you tested? I don't see any issues.

--

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


dls25 said:
I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub


Stephen Lebans said:
What's in your Current event?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Where would i put my code????

Stephen Lebans said:
Have you tested? I don't see any issues.

--

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


dls25 said:
I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub


Stephen Lebans said:
What's in your Current event?

--

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


I tried this, but I have something in the Sub_Current(). Can I still
enter
this?

:

Hi Arvin,
that's an older Access 97 only solution. For A2K and higher see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or
Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or
Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting
of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to based
on
a
Boolean(Yes/No) field.
--

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



Click on the record selector on the left to select the entire
record.
To
highlight a row when working on a single control, use Stepheb Lebans
code
at:

http://www.lebans.com/formatbycriteria.htm
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

I have a table in form view with numerous records, how can i
highlite
the
whole row when selecting?


Diane
 
You lost me. You already have the code you posted in your form's Current
event.

This will select the entire row when the user clicks on any field of a row.

Private Sub Form_Current()
DoCmd.RunCommand acCmdSelectRecord
End Sub




If you use Access2000 or higher Conditional Formatting is supported which
would allow you finer control over the individual control's properties. I've
already pointed tou to the sample CF MDB on my site.
--

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



dls25 said:
Where would i put my code????

Stephen Lebans said:
Have you tested? I don't see any issues.

--

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


dls25 said:
I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub


:

What's in your Current event?

--

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


I tried this, but I have something in the Sub_Current(). Can I still
enter
this?

:

Hi Arvin,
that's an older Access 97 only solution. For A2K and higher see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or
Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or
Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting
of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of
an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to
based
on
a
Boolean(Yes/No) field.
--

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



Click on the record selector on the left to select the entire
record.
To
highlight a row when working on a single control, use Stepheb
Lebans
code
at:

http://www.lebans.com/formatbycriteria.htm
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

I have a table in form view with numerous records, how can i
highlite
the
whole row when selecting?


Diane
 
This code works for me. (you asked for what code was in On Current). But it
is not for highliting a row. This is what I am trying to do, add this bit of
code from this web site.
For A2K and higher see: http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View


Stephen Lebans said:
You lost me. You already have the code you posted in your form's Current
event.

This will select the entire row when the user clicks on any field of a row.

Private Sub Form_Current()
DoCmd.RunCommand acCmdSelectRecord
End Sub




If you use Access2000 or higher Conditional Formatting is supported which
would allow you finer control over the individual control's properties. I've
already pointed tou to the sample CF MDB on my site.
--

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



dls25 said:
Where would i put my code????

Stephen Lebans said:
Have you tested? I don't see any issues.

--

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


I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub


:

What's in your Current event?

--

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


I tried this, but I have something in the Sub_Current(). Can I still
enter
this?

:

Hi Arvin,
that's an older Access 97 only solution. For A2K and higher see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or
Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or
Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting
of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of
an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to
based
on
a
Boolean(Yes/No) field.
--

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



Click on the record selector on the left to select the entire
record.
To
highlight a row when working on a single control, use Stepheb
Lebans
code
at:

http://www.lebans.com/formatbycriteria.htm
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

I have a table in form view with numerous records, how can i
highlite
the
whole row when selecting?


Diane
 
I would suggest that if you simply want the entire row selected when you
click on any control in a row that place the following statement in the
form's Current event.

Private Sub Form_Current()
DoCmd.RunCommand acCmdSelectRecord
End Sub


--

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


dls25 said:
This code works for me. (you asked for what code was in On Current). But
it
is not for highliting a row. This is what I am trying to do, add this bit
of
code from this web site.
For A2K and higher see: http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View


Stephen Lebans said:
You lost me. You already have the code you posted in your form's Current
event.

This will select the entire row when the user clicks on any field of a
row.

Private Sub Form_Current()
DoCmd.RunCommand acCmdSelectRecord
End Sub




If you use Access2000 or higher Conditional Formatting is supported which
would allow you finer control over the individual control's properties.
I've
already pointed tou to the sample CF MDB on my site.
--

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



dls25 said:
Where would i put my code????

:

Have you tested? I don't see any issues.

--

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


I copied this..
Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next
ParentDocName = Me.Parent.Name
If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![6sublResults].Requery
End If
Form_Current_Exit:
Exit Sub
Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit
End Sub


:

What's in your Current event?

--

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


I tried this, but I have something in the Sub_Current(). Can I
still
enter
this?

:

Hi Arvin,
that's an older Access 97 only solution. For A2K and higher see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how
to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or
Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or
Datasheet
View

Version 2.7

Added sample demonstrating how to achieve a background
Hover/Highlighting
of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable
of
an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to
based
on
a
Boolean(Yes/No) field.
--

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



Click on the record selector on the left to select the entire
record.
To
highlight a row when working on a single control, use Stepheb
Lebans
code
at:

http://www.lebans.com/formatbycriteria.htm
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

I have a table in form view with numerous records, how can i
highlite
the
whole row when selecting?


Diane
 
Back
Top