The combo wizard in my version of Access 97 does not have the "Find a record based on the value I seleted" option. Can someone please give me the code. Thanks.
In the AfterUpdate event procedure of the ComboBox paste the following:
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[SearchField] = '" & Me![ComboName] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
The ComboBox has two columns with the first being the SearchField and it is the bound column for the ComboBox.
Thanks! Now the form points to the first record that matches the search field but displays all records. I would like for it to only display the records that match the combo box. How do I do that?
I don't understand the kind of form that you are describing. When you say that it displays all records what do you mean? Is the record selected in the combobox the record being displayed in the form objects of your form? Do you mean that you can scroll through your records using the RecordIndicator at the bottom of the form.?
I don't understand the situation. Please be very specific.
Okay, I'll see if I can explain (I am obviously learning as I go here). I have designed a search form - in this case, a list of contributors for a fundraising campaign. I want to be able to select a name in the combo box and have the form display only that record. What happens now is that all records are displayed and the matching record is indicated by record selector on the side of the form.
Thanks again.
It sounds like you have created a form in Data Sheet view. This is a column for each field and a row for each record. There are other types of forms that you can create with the Forms Wizard. It will walk you through creating a form with just one records data showing in individual form textbox objects. On this form you can place a find record button that will perform the function that you asked for earlier. I believe that is what you are looking for.
Click the Forms tab in the database window and click the New button. On the next window select Form Wizard and select the underlying Table or Query that will feed records to the form. Then click OK.
Follow the prompts and the Wizard will assist you in creating a form that will perform as you asked.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.