RE: miltiple Buttons relating to records
- From: Rod Plastow <RodPlastow@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 05:06:02 -0700
Hi Jako,
Is it always 8 * 5 ? If so think in terms of two-dimensional arrays and
construct the control name according to its position. For example btn24 is
row 2 column 4. (Yes I know the standard prefix for a command button is cmd
but I prefer to reserve cmd for ADODB.Command.) Hence you can
predict/calculate the name of a control in a certain cell.
Most (all?) form controls have a tag property where you can store a foreign
key, converting to string format if necessary. This gives you your link to
other information in the database.
I would question your choice of command buttons. There's nothing wrong
except that you have fewer properties that can be altered for highlighting
purposes. The notable omission is that you cannot change backcolor; on the
other hand you can easily put a picture on command buttons. Have you
considered using text boxes instead? You can even cover the text boxes with
an enabled transparent command button if you disable and lock the text box.
Hope this gives you a few design toughts.
Regards,
Rod
"Jako" wrote:
Well here is a tricky one for me. Basically what I want to achieve is.
this: I'm creating this for a real estate, I have a "window-display"
with multiple properties in them, displaying either properties,
advertisements, profiles or something else. But I need to track what is
currently in the window display, for this to happen I thought of
creating a form with multiple buttons (8 * 5), on it to display the
different displays in the window, which should have as its caption
ether the property name, or whatever is in the display at that moment.
It should be able to change color whenever a property expires (that
will happen when the property is recorded as sold, withdrawn or no
longer listed, this is recorded in another form) or if it has been in
the same spot for too long (15 days) ext.
In other words you have to put into every button what is on the window
at that time all the relevant information needed, and it should notify
you when to change it or do something with it. Whenever something
changed color you will have to click on the button that changed color
and it should bring up the record or table information relating to that
separate button. I was thinking of doing this in 2 tabs, the first
where you select what kind of display it is (property, advertising,
profile, else with a option button) and the second tab is then to enter
the information relating to what your first answer was. e.g. property
from drop down list box which is referenced from another table, the
details about the advertising information, the date it was placed on
the display, when it should be changed or whatever is in the display
with a short caption that will ultimately be displayed as the button's
caption.
The problem however is that to do the coding for 40 buttons will be
disastrous, and I know there must be a simpler way to do this, for
instance some sort of array that links the button to the specific
record that just holds this information.
Any help on this issue will greatly appreciated. And if anyone can
think of a better way to approach this please feel free
- Follow-Ups:
- Re: miltiple Buttons relating to records
- From: Jako
- Re: miltiple Buttons relating to records
- References:
- miltiple Buttons relating to records
- From: Jako
- miltiple Buttons relating to records
- Prev by Date: Re: BE on internet
- Next by Date: Re: miltiple Buttons relating to records
- Previous by thread: miltiple Buttons relating to records
- Next by thread: Re: miltiple Buttons relating to records
- Index(es):