?
Solved

New ADODC objects?

Posted on 1998-10-05
3
Medium Priority
?
192 Views
Last Modified: 2008-02-01
I have a products table, wath I want to do is simple. Have a combo box contaning all to products name. When I choose a products in combo box. The recordset jump to this record.
I find it difficult to navigate with the ADO recordset becuase there is no seek method and I don't understand the find method! How can I go to a specific record?
0
Comment
Question by:pjroy
[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
3 Comments
 
LVL 3

Expert Comment

by:TheAnswerMan
ID: 1438235
REcordset.Find("Field = '" & combo1.text & "'")
0
 

Author Comment

by:pjroy
ID: 1438236
Excuse me for rejecting the answer. I use the DataEnvironment and I cannot do a search like I want.

I uses this command
Ex.: DataEnvironment1.rsPRODUCT.Find ("ProdNo=2") //normally the number come from a combo box
DataEnvironment1.rsPRODUCT.Requery

I think it doesn't work because the other control bound to this datasource are not updated!
0
 
LVL 3

Accepted Solution

by:
TheAnswerMan earned 60 total points
ID: 1438237
I am not sure what it is that you cant do..
You have a dataconrol.. and a combo..
everthing works fine.. except that you do not change the recordsets record when you select a new combo item..

to fix this..  do this..

Private Sub DBCombo1_Click(Area As Integer)
DataEnvironment1.Recordset.Find (DBCombo1.ListField & " = '" & DBCombo1.Text & "'")
End Sub

'Of course you should use the field name instead of the dbcombo1.listfield.. but it still works.. and if you change the field in the combo.. it will still work and you wont have to change anything..

0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

770 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