subform textbox value

ingrid

Registered User.
Local time
Today, 12:22
Joined
Apr 10, 2003
Messages
42
I have a subform with the field "description". I have a commandbutton with

Sub commandbutton
msgbox description
End Sub

This works OK.

I would like to msgbox the description with clicking on the field "description" but that doens't work (nothing happens). I also tryed a label with msgbox description. That gives a messagebox but not with the right value.

Is it possible to get the same result with a label as with the commandbutton?
 
Last edited:
I have simulated the look of web pages by allowing users to click on labels with the On Click event, so I know this must be possible. What is the code you are using in the Click event of your label? What value are you expecting and what are you getting?
 
Private Sub vomschrijving_Click()
MsgBox vomschrijving.Value
End Sub

The value I expect is the value that is in the field "vomschrijving". Nothing happens when I click.
 
Private Sub vomschrijving_Click()
MsgBox "" & Me.vomschrijving
End Sub
 
If the button is on the Main form you have to use the full forms references
 
I' m clicking on the textbox in the subform.
 
I don't see anything wrong with what you're doing except that you should be using the double-click event rather than the click event. Is the control enabled and unlocked? You won't be able to click in it if it is locked.
 

Users who are viewing this thread

Back
Top Bottom