Solved

Error when selecting an item from the list of a DBCombo Box.

Posted on 1998-09-07
2
170 Views
Last Modified: 2012-06-22
Hi,

I'm running VB5 with Service Pack 3 applied. I Have a form with a data control on it and a DBComboBox and several text boxes bound to the data control. When I step through the recordset using the data control's buttons everything is fine, all the controls keep in sync. However when I click on the ComboBox and select an item from the list, I get the following error :

Error 3426, This action was cancelled by an associated object.

When I hit the debug button it hightlights the following line :

Data1.Recordset.Bookmark = DBCombo1.SelectedItem

As far as I'm aware the SelectedItem property returns a variant value. Am I using the right property or is there another one which I should use. This also occurs if I use the Sheridan data bound ComboBox.

Any Suggestions?

Thanks,
John Gill.
0
Comment
Question by:jgill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 100 total points
ID: 1433426
jgill,
You need to find the record that matches the dbcombo.
in the dbCombo change event (or Click), add:

data1.recordset.findfirst "fieldName = '" & dbcombo1.Text & "'"

By the way, are you using the same data control for both recordsource and rowsource?

Regards
Dalin
0
 

Author Comment

by:jgill
ID: 1433427
Dalin,

Thankls for your response, I've not tried your suggestion yet but in response to your question: I am using the same data control for the recordsource & rowsource. I've tried using different data controls but I still get the problem.

John Gill
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question