Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Using the Find Record setting for a Combo Box in Access 2013

Using the Find Record setting for a Combo Box in Access 2013

I have a form set to Single record view. To help my users find a specific record I set up a combo box using the Combo Box Wizard and then selecting the "Find a record on my form based on the value I selected in my combo box" selection. I finished creating the ComboBox.

Here is the embedded macro that was created by the wizard:
SearchFor Record
Object Type (Blank)
Object Name (Blank)
Record First
Where Condition ="[ID] = " & Str(Nz([Screen].[ActiveControl],0))

After saving and opening the form in Form View...everything works. When I make a selection with the combo box that record shows on the form.

When I save and close the DB and then reopen it and then make a selection on the combo box I get this message:

Object or class does not support the set of events "OK"
When I select OK it shows the macro in single step showing:

Macro Name: Tasks Form:Combo98:AfterUpdate:Embedded Macro
Condition (Blank)
Action Name: SearchForRecord Error 2950
-1, , First, ="[ID] = "& Str(Nz([Screen].[ActiveControl], 0))

I checked Error 2950, on the WEB, and set the location of the DB as a trusted site. This did not fix the problem.

Any Suggestions?

RE: Using the Find Record setting for a Combo Box in Access 2013

What if you fill in names where there are blanks?
Object Type (Blank)
Object Name (Blank)

RE: Using the Find Record setting for a Combo Box in Access 2013

I will give it a try but I would have expected the wizard that created the macro to do that. And, remember, if I don't close the DB it works. Only after I close and reopen the DB does it fail.

Thanks for the suggestions I will let you know the results.

RE: Using the Find Record setting for a Combo Box in Access 2013

In the afterupdate event of the combobox

me.recordset.findfirst "[ID] = " & me.YourComboBoxName

RE: Using the Find Record setting for a Combo Box in Access 2013

I'd double check the 'trust' setting you have for the folder holding the database. Access will run code/macros, when going from Design View straight into Form View, and then running it, even with the folder not 'trusted,' but will balk when closing the Form and then opening it directly, in Form View, under the same conditions.

Apparently the Access Gnomes assume that if you are developing the db (an assumption they make because you were in Design View,) you can be trusted to run the code/macros, even if the file is not in a 'trusted' location...but if you're opening the Form directly in Form View, you could be a simple user, and need to follow the 'trusted' rule, as it were!

Linq ;0)>

Hope this helps!

There's always more than one way to skin a cat!

All posts/responses based on Access 2003/2007

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close