Solved

New ADODC objects?

Posted on 1998-10-05
3
174 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now