Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 equiv. of VBAs Requery

Status
Not open for further replies.

rickyoswaldiow

Programmer
Jul 16, 2007
127
GB
Does anyone know the Visual Basic 6 equivilent of VBAs .Requery? i.e. Me.cboBankUpdatedBy.Requery
 
Similarly with .column? These are being used on DataCombo controls...
Code:
!UserFirstName = Left("" & Me.cboBankUpdatedBy.Column(1), 20)
 
I have replaced .column(1) with .text. This works for my application.
 
There are quite a few objects that are instantiated in the Access development environment that people think are part of VBA, since they don't use them until they start programming. Requery is actually a method on a number of objects in the Access object library, and is not found in the VBA library. The VBA library has things like the Math and String functions, common objects such as the error object, and the like. Not realizing that some of your favorite techniques are dependent on underlying instances of objects in the Access object library (automatically created by the IDE) can be a bit disconcerting when you move to the VB6 environment.

To see this for yourself, open Access. Open up the VBA window, and view the object browser. Do a search for requery. You'll find that with one exception (the DAO recordset object) the requery method is part of multiple objects in the Access library.

Now go to VB. View the object browser. Do a search for requery. Note that none are found. Now, set a reference (Project References in the menu) to the Access object library, and you'll see all of the references come up.

HTH

Bob

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top