Data on a Command Button

message from Mariagloria on 12 May 2004
Hello, can anyone help me with this?

I need to display a data field on a command buttom. The
same button I'll use to display the datail.

Thanks
 
Mariagloria replied to Mariagloria on 14 May 2004
I think I=B4m doing somthing wrong becouse it did=B4t work. =20
This is in Form view, I assigned the value of the field=20
in the current event of the form but it never displayed=20
the field on the buttom. I think I forgot to say that=20
there are several fields ia xant to display in this way=20
inside the same form. Would you try to help me again. =20
Please
Mariagloria.
escribi=F3 en el mensaje
 
Allen Browne replied to Mariagloria on 15 May 2004
This example assigns the value of the Surname field to the caption of
Button0. If the field is Null, the caption reads: {Unknown}

Private Sub Form_Current()
Me.Button0.Caption = Nz(Me.[Surname], "{Unknown}")
End Sub
 
Allen Browne replied to Mariagloria on 13 May 2004
If this in Form view, assign the value of your field to the Caption of the
button in the Current event of the form.

If this is Continuous or Datasheet view, that won't work, so you will be
resorting to tricks to try to place a text box over the button to simulate a
result.
 

Archived message: Data on a Command Button (Microsoft Access)