471,337 Members | 1,057 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Continuous Form GoTo specific record

Using Access 2000. I have a continuous form which for simplicity sack
has two fields Social Security Number and Last Name.

In the header of the continuous form I have a textbox where you can
type in any part of a social security number and when you do I want it
to take the user to the closest match SSN record in the continuous
form.

For Example you have three records
SSN LastName
111-11-11111 Jones
222-22-22222 Smith
333-33-33333 Tyler

Is the user types in a 2 in the textbox and clicks the find button;
the first record in the continuous form will be SSN 222-22-22222 and
you would still have the ability to scroll up
or down to see the records above and below.

Right now I am using a Filter. For example when the user types in a
2, I do a filter saying give me all SSNs which are >= 2. This works
ok but the user can not scoll up.
Any help would be appreciated.

Mar 21 '07 #1
3 11300
eighthman11 wrote:
Using Access 2000. I have a continuous form which for simplicity sack
has two fields Social Security Number and Last Name.

In the header of the continuous form I have a textbox where you can
type in any part of a social security number and when you do I want it
to take the user to the closest match SSN record in the continuous
form.

For Example you have three records
SSN LastName
111-11-11111 Jones
222-22-22222 Smith
333-33-33333 Tyler

Is the user types in a 2 in the textbox and clicks the find button;
the first record in the continuous form will be SSN 222-22-22222 and
you would still have the ability to scroll up
or down to see the records above and below.

Right now I am using a Filter. For example when the user types in a
2, I do a filter saying give me all SSNs which are >= 2. This works
ok but the user can not scoll up.
Any help would be appreciated.
In the AfterUpdate event you could enter some code like
Dim rst As DAO.Recordset
set rst = Me.RecordsetClone
rst.FindFirst "SSN = '" & Me.TextBoxName & "'"
If not rst.NoMatch Then Me.BookMark = rst.BookMark
rst.close
set rst = Nothing

I have no idea what your textbox name is.
Mar 21 '07 #2


Look into using the RecordsetClone and bookmark properties as well as
the Find methods (assuming DAO). The wizard used when creating form
controls will generate code that's fairly easy to modify to suit your
needs.

Mar 21 '07 #3
On Mar 21, 11:18 am, "storrboy" <storr...@sympatico.cawrote:
Look into using the RecordsetClone and bookmark properties as well as
the Find methods (assuming DAO). The wizard used when creating form
controls will generate code that's fairly easy to modify to suit your
needs.
I would like to thank everyone for their help. The FindRecord worked
great. All I had to do was add a wildcard "*" to the end of the
search criteria that the user types in the text box. This brings me
to the closest match record in the continuous form.
Thanks again.

Mar 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Paolo | last post: by
5 posts views Thread by Armando | last post: by

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.