A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

record in datasheet



 
 
Thread Tools Display Modes
  #1  
Old October 31st, 2009, 09:23 PM posted to microsoft.public.access.forms
seeker
external usenet poster
 
Posts: 133
Default record in datasheet

I have a form which is in datasheet format and would like to have the record
that is found by docmd.findrecord highlited instead of just arrow to the left
of first column. How would this be done?
  #2  
Old October 31st, 2009, 10:26 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default record in datasheet

Two questions:

How are you planning to use DoCmd.FindRecord? You realize that you cannot
have command buttons on a Datashet View form?

What exactly do you want to 'hilight?' What you have in Datasheet View is a
row of connected textboxes. There is, in essence, nothing that will 'hilight'
the row, if that's what you're talking about. If you placed code in the
Form_Current event you could have a particular field receive focus and
hilight that field every time you move to a different record.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200910/1

  #3  
Old November 1st, 2009, 01:19 AM posted to microsoft.public.access.forms
seeker
external usenet poster
 
Posts: 133
Default record in datasheet

Thank you i am sorry I should have said subform that is datasheet view. A
text box in primary form is used to develop a search on partial or full last
name of customer. The row that is found needs hilited not just the one field.
It would be as if I clicked on the row to hilite it. Thank you again.

"Linq Adams via AccessMonster.com" wrote:

Two questions:

How are you planning to use DoCmd.FindRecord? You realize that you cannot
have command buttons on a Datashet View form?

What exactly do you want to 'hilight?' What you have in Datasheet View is a
row of connected textboxes. There is, in essence, nothing that will 'hilight'
the row, if that's what you're talking about. If you placed code in the
Form_Current event you could have a particular field receive focus and
hilight that field every time you move to a different record.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200910/1

.

  #4  
Old November 1st, 2009, 11:19 PM posted to microsoft.public.access.forms
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default record in datasheet

Using the FindRecord method, the following code in the parent form's module
should find and highlight a row in the subform in a subform control named
sfcCustomers where the LastName value starts with the string entered in the
text box txtName in the parent form.

Dim frm As Form

Set frm = Me.sfcCustomers.Form

Me.sfcCustomers.SetFocus
frm.LastName.SetFocus
DoCmd.FindRecord Me.txtName, acStart
RunCommand acCmdSelectRecord

Personally I'd not have used the FindRecord method, but instead found the
record in a clone of the subform's recordset and then, if a match exists,
synchronized the bookmarks:

Dim frm As Form
Dim rst As Object

Set frm = Me.sfcCustomers.Form
Set rst = frm.Recordset.Clone

With rst
.FindFirst "Lastname Like """ & Me.txtName & "*"""
If Not .NoMatch Then
frm.Bookmark = rst.Bookmark
Me.sfcCustomers.SetFocus
RunCommand acCmdSelectRecord
End If
End With

Ken Sheridan
Stafford, England

seeker wrote:
Thank you i am sorry I should have said subform that is datasheet view. A
text box in primary form is used to develop a search on partial or full last
name of customer. The row that is found needs hilited not just the one field.
It would be as if I clicked on the row to hilite it. Thank you again.

Two questions:

[quoted text clipped - 6 lines]
Form_Current event you could have a particular field receive focus and
hilight that field every time you move to a different record.


--
Message posted via http://www.accessmonster.com

  #5  
Old November 1st, 2009, 11:25 PM posted to microsoft.public.access.forms
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default record in datasheet

A complete row can be highlighted by means of the acCmdSelectRecord constant
as the command argument of the RunCommand method.

Ken Sheridan
Stafford, England

Linq Adams wrote:
Two questions:

How are you planning to use DoCmd.FindRecord? You realize that you cannot
have command buttons on a Datashet View form?

What exactly do you want to 'hilight?' What you have in Datasheet View is a
row of connected textboxes. There is, in essence, nothing that will 'hilight'
the row, if that's what you're talking about. If you placed code in the
Form_Current event you could have a particular field receive focus and
hilight that field every time you move to a different record.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1

  #6  
Old November 2nd, 2009, 03:08 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default record in datasheet

Thanks, Ken! Always like to learn something new!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.