Computer Learning Zone CLZ Access Excel Word Windows

One is free to imagine and effect changes on the world. And if enough people do it, there are big changes.

-Neil Peart
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Can a Button Hold a Value
ystein Frostad 

12 months ago
I am developing a new type of access db, using buttons to visulize on screen. Buttons have good propperty with colors and positions and so on. So I create a lot of buttons and make a name on eatch buttons and also make them unvisible.
I can't make the button-name as an array like "button(I)" That would have been nice, but not possible. Next problem I still hope somebody can help me with. Making a button to hold a value. I try to hide the value in the .caption and then use it in a docmd.openform with a creteria. But vb will not have any of it. (Try with [] and val and so on) So labels and fields can hold a value, but not Buttons.... or is it a smart way anybod can help me with this ??
When I make the button visible, I also do some calculations I dont want to do again to find the value I am looking for.
Adam Schwanz  @Reply  
           
12 months ago
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 Hedley  @Reply  
           
12 months ago
Richard Rost  @Reply  
          
12 months ago
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.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 1:41:12 AM. PLT: 0s