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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i refresh ADO data control?

Status
Not open for further replies.

mohanq

Technical User
Jun 12, 2002
8
US


hi,

I am using ADO Data Control to display the records in MSHFlexGrid control.
I set the recordsource property to adodc control with the query in the form of string variable.

dim str
if cmbMembers.text = "" then
str = "select * from temp where id like "M*"
else
str = "select * from temp where id not like "M*"
end if
Adodc1.recordsource = str
adodc1.refresh

set mshflexgrid1.datasource = adodc1
mshflexgrid1.refresh

My problem is, when cmbMembers.text is null, it needs to display the records in null condition specified above, and if cmbMember.text is not null, it needs to display records specifed above in else condition.

when i used above code snippet, adodc control is not refresh and displays with previous output. pls let me know how to resolve it.

thanks in advance,
mohan.

 
Change the * asterisk to % percent sign. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top