473,418 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

A2K - how to select a record, programatically on a continuous subform

I have a little search routine going whereby the user types in some text and
clicks a button on the main form.
I then see if that text exists in a record on the subform. I get a match,
grab the record id and am now trying to automatically highlight that record
in the subform to show the user they got a hit.

How can I select that record and then perhaps move the focus into a specific
textbox?

I'm trying this a number of ways and Access isn't cooperating.
thanks
Martin
Aug 30 '07 #1
4 6117
On Aug 30, 8:29 am, "Deano" <de...@mailinator.comwrote:
I have a little search routine going whereby the user types in some text and
clicks a button on the main form.
I then see if that text exists in a record on the subform. I get a match,
grab the record id and am now trying to automatically highlight that record
in the subform to show the user they got a hit.

How can I select that record and then perhaps move the focus into a specific
textbox?

I'm trying this a number of ways and Access isn't cooperating.

thanks
Martin
It is possible, but it isn't easy. Look at this link:
http://www.mvps.org/access/forms/frm0047.htm

Aug 30 '07 #2

"OldPro" <rr*******@sbcglobal.netwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
On Aug 30, 8:29 am, "Deano" <de...@mailinator.comwrote:
I have a little search routine going whereby the user types in some text
and
clicks a button on the main form.
I then see if that text exists in a record on the subform. I get a
match,
grab the record id and am now trying to automatically highlight that
record
in the subform to show the user they got a hit.

How can I select that record and then perhaps move the focus into a
specific
textbox?

I'm trying this a number of ways and Access isn't cooperating.

thanks
Martin

It is possible, but it isn't easy. Look at this link:
http://www.mvps.org/access/forms/frm0047.htm
I think that just highlights the current record selected by the user. I
want the program to select the record without any user intervention.
Aug 30 '07 #3
Deano wrote:
I have a little search routine going whereby the user types in some text and
clicks a button on the main form.
I then see if that text exists in a record on the subform. I get a match,
grab the record id and am now trying to automatically highlight that record
in the subform to show the user they got a hit.

How can I select that record and then perhaps move the focus into a specific
textbox?

I'm trying this a number of ways and Access isn't cooperating.
thanks
Martin

I have, on most continuous form, a text box above each column that the
users can enter text, numbers, dates to search on. Uses the F3 key to
find the next one. It's gotten pretty generic for me to create such a
form. But the basic concept is to find the rec and move to it. Let's
say the continuus form's key is called ID. You search the LastName
field for Smith.
Dim rst As Recordset
set rst = Forms!MainForm!Subform.Recordsetclone
rst.findfirst "LastName = 'Smith'"
If not rst.Eof then
Forms!MainForm!Subform.Bookmark = rst.Bookmark
Else
msgbox "Not found, try again."
Endif
rst.close
set rst = Nothing
Aug 30 '07 #4
On Aug 30, 9:09 am, "Deano" <de...@mailinator.comwrote:
"OldPro" <rrossk...@sbcglobal.netwrote in message

news:11**********************@19g2000hsx.googlegro ups.com...


On Aug 30, 8:29 am, "Deano" <de...@mailinator.comwrote:
I have a little search routine going whereby the user types in some text
and
clicks a button on the main form.
I then see if that text exists in a record on the subform. I get a
match,
grab the record id and am now trying to automatically highlight that
record
in the subform to show the user they got a hit.
How can I select that record and then perhaps move the focus into a
specific
textbox?
I'm trying this a number of ways and Access isn't cooperating.
thanks
Martin
It is possible, but it isn't easy. Look at this link:
http://www.mvps.org/access/forms/frm0047.htm

I think that just highlights the current record selected by the user. I
want the program to select the record without any user intervention.- Hide quoted text -

- Show quoted text -
It's the same basic idea, except that instead of comparing the current
record to the selected record in the onCurrent event, you compare the
current record to the record you want hilited. It is possible to do a
multi-select this way too.

Aug 31 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William Wisnieski | last post by:
Hello Again, I'm really stuck on this one.....so I'm going to try a different approach to this problem. I have a query by form that returns a record set in a datasheet. The user double...
3
by: Mark | last post by:
Hi there, I have a subform, set as a continuous form. When a user selects a particular record in that subform, how can I make that particular record stand out (color or font change, size, etc) from...
9
by: Karl Roes | last post by:
Hi All, I would like some advice on Next / Previous record buttons. I have a main form for the client, and a continuous subform listing client transactions. If I open one of these transactions...
0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
6
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
3
by: Typehigh | last post by:
I am a good programmer, but this one stumps me! I have a form with a continuous subform. The continuous subform contains records of data and may reach a depth of 1000's of entities. I have...
1
by: kaeldowdy | last post by:
This one is stumping me! I have a Form/Subform arrangement. The main form is set as a Single Form and the sub form is set as Continuous Forms. On the Form_AfterUpdate event of the subform, I...
1
by: Simon | last post by:
Dear reader, How can I move the record pointer in a sub form. The sub form is a datasheet type. Both forms have the same reference key. How can I move the record pointer in the sub form...
0
by: Andrew | last post by:
Hi all A quick question which I've not been able to solve from trawling the web. Is it possible to have a control in the detail section of a form set to a default view of "Continuous" which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.