Solved

New ADODC objects?

Posted on 1998-10-05
3
188 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 30 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

Independent Software Vendors: 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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

695 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