Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

Check Command Button status in database at the time of execute...

$
0
0
Hi all,

I have 3 command buttons in my form. when I execute program, I need to check my database/Table for some query.
below is my code...

Code:

private function ChkData()
set rs = db.opentable("Select * from abc where isdel = false")
if rs!TNo = "T 1" then cmd1.backcolor = vbred else cmd1.backcolor = vbgreen
if rs!TNo = "T 2" then cmd2.backcolor = vbred else cmd2.backcolor = vbgreen
if rs!TNo = "T 3" then cmd3.backcolor = vbred else cmd3.backcolor = vbgreen
end function

Code:

private sub Form_Load()
chkdata
end sub

I tried with do while...loop also but I didn't get what I want.

so, plz help for same.

Thanks in advance

kaushal

Viewing all articles
Browse latest Browse all 21089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>