Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent Command Buttons!

Status
Not open for further replies.

Turbo

Programmer
Aug 23, 2000
93
0
0
US
As you may be aware, a command button in Access 2000 does not show text when it is transparent. What if the form has an image that you want to see through the button? To present a transparent button that is transparent but shows the text, try this....

Create a button, establish its properties(name, caption, size, events, etc.)just as any normal button. Set the transparent property to "yes". Then create a label with the same properties, especially the transparent to "yes" but do not add any events. Size the label to be the same size as the button. Drag the button over the label and save. Now the button works as normal allowing your form to be visable through the button and the label gives the appearance of an actual button with text.

Hope this is helpful for you. [sig]<p>Turbo<br>[/sig]
 
This works great with Access 97 too.
It's also a good technique to simulate html hotspots

Good tip, Turbo!

Still new to DB's and enjoying learning day by day
 
Ok, what about a disappearing command button? On one of my forms, whenever you input the same data into one record as you have for another (not an indexed field, it just lets you know that two records have similar info), a list box appears to let you know which records they are. To keep it neat, the list box doesn't list all the info on the records, just one or two fields, so I created another form so you can view these like records.

I was able to do it with the list box (pretty easily), but how would I get the button to view the similar records to not appear if there are no like records?

Let's see you figure this one out!
Gene
 
use the ListCount property for your ListBox

If ListBoxName.ListCount = 0 then
CommandButtonName.Visible = False
Else
CommandButtonName.Visible = True
End if

PaulF
 
Cool. A little easier than I thought. Thanks.

Gene
 
Turbo: you don't need to create a button AND a label of matching size. add the event to any text label and change the appearance of it to suit your taste (transparency, border and text style etc).

Gion
 
Ctrler

Just what i was thinking. Which begs the question Turbo what aspect of the button do you want that you can't get from the Text label control? mike.stephens@bnpparibas.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top