By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,533 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

Continuous Form GoTo specific record

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a


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

P: n/a
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.