Solved

New ADODC objects?

Posted on 1998-10-05
3
172 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
Comment Utility
REcordset.Find("Field = '" & combo1.text & "'")
0
 

Author Comment

by:pjroy
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 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…
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…

771 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

16 Experts available now in Live!

Get 1:1 Help Now