Dynamic Search

G

Guest

I have a form that shows 4 linked tables (Family, Member, DepartmentGroup,
DateGroup) I use this form to mark kids present for Sunday School. I now have
over 400 names and was wondering how I can get the Family.Lastname to auto
search, much like Explorer stores the last web pages. You type 's' and all
the s's list, then you type 'm' and all the SM's list then 'i' and the smi's
list etc.. and when you hit enter all the data of that individual will fill
the form so that the volunteer can mark them present for the morning. If
there are more then one Smiths I would then type in the member.firstname and
the same routine would happen. Thank you for your help in this matter.
 
P

PC Datasheet

Use a combobox on your form. Base your combobox on a query based on the
Family table. Sort Family.lastName ascending. Set the autoexpand property
under the Data tab to Yes.
 
G

Guest

Thanks PC Datasheet for your response, will my typing in the combobox not
just overwrite the existing data in that box? Does the autoexpand tell it to
populate the from with the data? PR
 
G

Guest

Make a combo box "LookupContactLast" showing the names, etc. where the Row
Source property is the SQL code to get the records you want and the Row
Source Type property is "Table/Query". Create an "After Update" event
procedure similar to the following:

Private Sub LookupContactLast_AfterUpdate()
Me.RecordsetClone.FindFirst " [ID] = " & Me![LookupContactLast]
Me.Bookmark = Me.RecordsetClone.Bookmark
'the field ContactLast is where the cursor lands on the form displaying
data
ContactLast.SetFocus
End Sub

Then the combo box retains the last name selected as the start position of
the next lookup. Not my idea; it was here from the last volunteer programmer.
 
G

Guest

Thanks Earl I'll try this. God Bless PR

EarlCPhillips said:
Make a combo box "LookupContactLast" showing the names, etc. where the Row
Source property is the SQL code to get the records you want and the Row
Source Type property is "Table/Query". Create an "After Update" event
procedure similar to the following:

Private Sub LookupContactLast_AfterUpdate()
Me.RecordsetClone.FindFirst " [ID] = " & Me![LookupContactLast]
Me.Bookmark = Me.RecordsetClone.Bookmark
'the field ContactLast is where the cursor lands on the form displaying
data
ContactLast.SetFocus
End Sub

Then the combo box retains the last name selected as the start position of
the next lookup. Not my idea; it was here from the last volunteer programmer.
--
Trying To Feed The Hungry


PC Datasheet said:
Use a combobox on your form. Base your combobox on a query based on the
Family table. Sort Family.lastName ascending. Set the autoexpand property
under the Data tab to Yes.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1175 users have come to me from the newsgroups requesting help
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top