Zeus wrote:
i created a phone book in access. and i added the save/delete
functionalities... but i need to add a search one.
currently, the built in search, will display the microsoft office
search (find and replace tabs).
what i need is to have two text boxes in my form (first name, second
name) and a search buttun. when i fill in the values in the text
boxes, the search button will take the entries and search the
DB.....and i need the results to be filled in the textboxes in the
form... how would that be done? thank you
I might have 2 textboxes; FirstName and LastName. Then have a combo box
to display/select the names
The combo box Recordsource may be something like
SELECT PhoneBookID, [FirstName] & " " & [LastName] AS FullName
FROM PhoneBook
WHERE FirstName = Forms!SearchForm!FirstName OR
LastName = Forms!SearchForm!LastName
Then when you enter something into a textbox, in the AfterUpdate event enter
Me.WhateverYourComboBoxNameIs.Requery
Then they can select the name from the dropdown list.
You can then search Phonebook table and have it fill in the names in the
AfterUpdate event of the combo box.