Solved

New ADODC objects?

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

785 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