Make Selected Buttons On A Form Flash

  • Thread starter Thread starter Rachel
  • Start date Start date
R

Rachel

There are 20 buttons on a form. Vendors are assigned to one or more buttons. Any
button may be assigned to one or more vendors. All buttons are assigned to at
least one vendor. I need help programming the form so that as the form navigates
from vendor, the buttons assigned to the current vendor slowly flash.

The principle behind this scenario is to build a form for assigning numerous
tables at a convention to exhibitors.

Thanks for all help!

Rachel
 
Hi Rachel,

I'm not sure about flashing - I believe you could do it by toggling the
visible property of each button using a timer event. Personally I hate
flashing things on a form anyway and would recommend that you consider using
color instead. You can easily change the foreground (font) color of buttons:

me.cmd1.forecolor=vbRed

I don't know how you determine which buttons are assigned to which vendor so
I can't help you with that part of the logic. Post back with more detail if
you need more help on that part.
 
I don't get it, I need more information, for instance:
- Are these 'buttons" command buttons?
- And what does each button signify and what happens when you click it?
- What do you mean by flash?
- Can you explain more about the purpose of this form?
- Can you describe the design of the underlying tables/relationships/fields?
- How does all this help to assign tables for the convention?

Sam
 
Thanks for all your responses!

I have over 100 buttons on a form representing tables in a convention center
that vendors use for exhibits. Prior to the convention, vendors have a deadline
to apply for specific tables. Post deadline, the tables are assigned to the
vendors on a first-come-first-serve basis. Of course there are many requests for
the same table so after a table has been assigned, subsequent vendors requesting
that table are assigned a nearby table that has not yet been assigned. My form
needs to show which tables have been assigned and the tables requested by the
current vendor to see if the tables he requested have previously been assigned.
Flashing the buttons the current vendor requested was just an idea, I am open to
any ideas you may have. After looking at the form to see which tables the
current vendor requested and if they have been previously assigned, the user
will click on a button representing a table to open a form to enter the vendor
assigned to the table the button represents.

Rachel
 
See my response to Sandra, Sam and Allen

Sam said:
I don't get it, I need more information, for instance:
- Are these 'buttons" command buttons?
- And what does each button signify and what happens when you click it?
- What do you mean by flash?
- Can you explain more about the purpose of this form?
- Can you describe the design of the underlying tables/relationships/fields?
- How does all this help to assign tables for the convention?

Sam
 
See my response to Sandra, Sam and Allen

Allen Browne said:
Flashing can be achieved by toggling a property (Visible?) in the Timer
event of the form. It might be frustrating trying to click a button as it
goes invisible, so you may prefer to alter the ForeColor, FontSize, or
FontBold properties of the buttons.

What tables do you have behind this form? If you have a normalized structure
with a one to many relationship between Vendors and Tables, you will need to
use the Current event of the Vendors form to OpenRecordset into the Tables
table and set the properties of the buttons on the form. You will also need
to change the properties and Execute an Update query to INSERT or DELETE the
record whenever a button is clicked.

It may be easier to use Toggle Buttons instead of command buttons. Toggle
buttons stay depressed for Yes or released for No.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I believe you should use the phrase "display tables" in place of
"tables" when referring to your form "representing tables in a
convention center," because most of the users of the CDMA newsgroup
automatically think of database tables when someone uses the word
"tables" in their post.

I understand your description to mean that you have a form that has
CommandButtons that are supposed to graphically represent the display
tables, and their locations, in a convention center. You want to
visually select display tables (CommandButtons) on the form and fill in
another form that will register each vendor to one, or more, display
table.

Suggestion:
I'd use Labels instead of CommandButtons. Labels are "lighter" than
Command Buttons (according to Microsoft) [lighter means the control
takes up less memory when the form is loaded.] Then you could change
the Label's BackColor to different colors that would indicate that the
display table is "Available," "Reserved" or some other state. You could
also set the Label's Caption property to the vendor's name or
abbreviation, so you could easily see which vendors have which tables.

Use the Label's OnClick event procedure to pop-up the form that you'd
use to register the vendor. When you close the form the vendor info
(including display table number) would be saved to the database table
that the vendor info form is bound to. Then the form which holds the
graphical representation of the convention center would update itself by
"seeing" which display table has changed state (by reading the database
table that the vendor info is stored in).

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBPyo+W4echKqOuFEgEQK5PACg9zFIHYlaLwSfZBy4Ynt46pRAcaUAnjBq
CbX0T7aR4/Px1M/GjqNULf2X
=pDtb
-----END PGP SIGNATURE-----
 
Hi Rachel,

First things first, it is better to keep to the original thread rather than
starting a new one so that all involved see the full conversation.

I agree with Allen's recommendations on the use of toggle buttons instead of
command buttons. I did a similar project for our warehouse to show available
locations. Each toggle button represents a location, those that are already
assigned are disabled. Those that are available are enabled, have a blue
label and are not depressed, those that are assigned to the current item are
red, enabled and depressed.

If your data is normalized, then this type of form also requires some
significant extra work since you have to take the data for the current
record, update the entire map to reflect the situation for that vendor. Then
your code has to use the state of each button after the submit button is
clicked to determine what updates/deletes need to occur on the base tables.
 
Back
Top