dataEnvironment Command CommandText requery 
Author Message
 dataEnvironment Command CommandText requery

I have a DE command bound to a mdb database
through ODBC by a SQL query

"select * from item order by referenceno"

Once the user has selected a specific Supplier
I want the CommandText to be

"select * from item where supplierid = " & strSupplierID & " order by
referenceno "

to restrict reference numbers to those from a selected Supplier.

The trouble is, how do I assign the new CommandText Query to the
rsItems command? I have tried the following and it does not work:

Dim strSupplierID As String
Dim strQuery As String
strSupplierID = dtlSuppliers.BoundText
strQuery = "select * from item where supplierid = " & _
    strSupplierID & " order by referenceno "
dsrODBC.rsItems.CommandText = strQuery             'This line is giving
dsrODBC.rsItems.Requery                                         'use this to
requery.  <Options>?

Sat, 19 Apr 2003 01:29:05 GMT
 [ 1 post ] 

 Relevant Pages 

1. Requery a Command from the DataEnvironment

2. Can't reset commandtext for recordset in dataenvironment using ADo

3. dataenvironment, connection, commandtext can i change it?

4. Help: Adding DataEnvironment Child Command Screws Up DataEnvironment

5. DataEnvironment Requery

6. Dataenvironment problem with Requery()

7. How can I requery a dataenvironment?

8. ADO Command->CommandText length

9. ADO Command->CommandText length

10. ADO, Command, CommandText, String Limit

11. Command.CommandText max length ??

12. ADO Command->CommandText length

Powered by phpBB® Forum Software