hi every one.. i have a problem of how i can change the caption of a label thats inside a picture box..

i want to load a field in a database to the the label

the problem is i cant do it..

there's no command like this

lblStartTime[B].Caption[/B] = rsRecordSet.Fields("Unit").Value & ""

only

lblStartTime.Count
.Item
.Ucase
.Lcase

are available..

thx to anyone who can help!

please check lblStartTime refers to a lebel or not or is there any control array.

Hi,

Your Label is a a Control Array. So, Check the "Index" Property of the Label, and Change your code to, Say If Index=2 then :

lblStartTime(2).Caption = rsRecordSet.Fields("Unit").Value & ""

Regards
Veena

ohh i see!, thx you miss Veen.
ill try to work on it now..
ty!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.