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!

ADO Data Control 6.0

Status
Not open for further replies.

VBEddie

Programmer
Jun 10, 2002
3
GB
Is it possible to alter the recordsource of ta ADOCDC at runtime?? I've tried it (and to re-bind controls to it) but get an error.

I understand that this is becuace controls can only be bound at deisgn time. Is this true??

Anybody know how i can get around this problem?

Thanks!!!!
 
Yes, you can change the RecordSource property of an ADODC at runtime, like so:

ADODC1.RecordSource = "select * from table1"
ADODC1.Refresh

Some control you can change the bindings at runtime (e.g., the Heirarchical Flex Grid control), but others you cannot (e.g., the Data Combo control). It would help if you could provide more information - what controls you are using, specific error messages, a code snippet, etc.

-JEB
 
helo there

u can change the recordset on runtime but be sure to close the existing recordset first then populate the new one and don't forgot to refresh the recordset.

datacombo and datalist boxes binding can also be changed at runtime

thanXXX
ComputerJin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top