Using the Find Record setting for a Combo Box in Access 2013
Using the Find Record setting for a Combo Box in Access 2013
(OP)
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
Arguments:
-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?
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
Arguments:
-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
Object Type (Blank)
Object Name (Blank)
RE: Using the Find Record setting for a Combo Box in Access 2013
Thanks for the suggestions I will let you know the results.
RE: Using the Find Record setting for a Combo Box in Access 2013
me.recordset.findfirst "[ID] = " & me.YourComboBoxName
RE: Using the Find Record setting for a Combo Box in Access 2013
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