By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Editing a Text Label on Form_Load()

damonreid
Expert 100+
P: 114
Is it possible to pass a field to a text label when a form loads?

I have tried
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     Dim textName As String
  3.  
  4.     textName = "Text Edit Text"
  5.  
  6.     Me.Text29 = textName
  7.  
  8. End Sub
But I get a run-time error 438
Object does not support this property or method.
Jul 20 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 344
Is it possible to pass a field to a text label when a form loads?

I have tried
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     Dim textName As String
  3.  
  4.     textName = "Text Edit Text"
  5.  
  6.     Me.Text29 = textName
  7.  
  8. End Sub
But I get a run-time error 438
Object does not support this property or method.
If Text29 is a label, then it can't hold a value, it is the caption property that holds the value, so try this
Expand|Select|Wrap|Line Numbers
  1. Text29.Caption=textname
  2.  
Jul 20 '07 #2

damonreid
Expert 100+
P: 114
That works perfectly, thank you very much.

Damon
Jul 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.