Buttons cannot "hold" a value as they are just buttons, now you can put the text of a value into the caption of a button if thats what you mean... You can also display values from an array as the caption of buttons using VBA. But that's not storing anywhere, it's just display text.
Are you saying you want to be able to do like this?
DoCmd.OpenForm "CustomerF",,,"CustomerID=" & MyButton.Caption
Alex is right - you can temporarily store data in its Tag property. Or you can set a different variable, like a Global Var or a Temp Var, when you click the button. But a Command Button itself has no value. Now a Toggle Button, on the other hand, can be bound to a field.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.