Put the following code in the AfterUpdate event of your unbound control:
Dim Rst As DAO.Recordset
Set Rst = Me!NameOfMainForm!NameOfSubformCONTROL.Form.RecordsetClone
Rst.FindFirst "[MinDia] >= " & Me!NameOfUnboundControl _
& " And [MaxDia] <= " & Me!NameOfUnboundControl
Me!NameOfMainForm!NameOfSubformCONTROL.Form.Bookmark = Rst.BookMark
Rst.Close
Set Rst = Nothing
Note: You might want to add additional code to the above to assure that the
unbound
control value is equal to or greater than the smallest MinDia in your
continuouse form and
that the unbound control is less than or equal to the largest MaxDia in your
continuouse form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1150 users have come to me from the newsgroups requesting help
(e-mail address removed)
Secret Squirrel said:
I have a subform that lists all my rercords in a continuouos form. Two of
my
fields are called "MinDia" and "Max Dia". What I need to do is use an
unbound
control on my main form to enter a diameter and have the record selected
that
the diameter falls in between the min/mas diameters. How can I set this
up?