EMAIL REMOVED (Pavan Arise) wrote in message news:<EMAIL REMOVED. com>...
> Hi all..
> This may seem simple..but I am stuck here! I have a frame in which
> I have a label. I was trying to change the caption of that label via
> code (I mean at runtime & not design time). But there is always an
> error saying "Compile error: Method or data member not found" I have
> no idea how to solve thsi problem. I have created my label on the
> frame itself. I tried to do it witha text box instead of a label...but
> in vain...the same error occurs. Though it may be very simple, I am
> not able to crack it. Can someone please help me out.I am stuck!!!
> Thanks in advance for any suggetsions or help.
>
> Regards,
> Pavan
It sounds like you are trying to pull the text that you want to ***ign
to the label or text box from a recordset. If this is the case, you
probably have the fieldname spelled wrong or have not opened the
recordset yet. To debug this and see what I mean (if I am right about
you trying to pull from a recordset), change your label ***ignment to
a declared string variable (Dim strTest as string). If you get the
same error, then it where you are trying to pull data from. If you are
pulling from a recordset, make sure:
1) You have properly declared the recordset and connection (if you are
using a connection to a data source)
2) You have properly opened both the recordset and, if appropriate,
the connection.
3) You have spelled the column name correctly and used the proper
syntax(rs!LastName and rs(0) are valid while rs.LastName is not)
If you are not pulling from a recordset, then ignore all of the above
and make sure you have your control name spelled correctly. :-)
David