By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,224 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,224 IT Pros & Developers. It's quick & easy.

Use of Parameter Query in Code

P: n/a
I have a form that displays and allows user to edit colorsets, each
colorset containing between 3and 11 colors.
Each individual color is a combination of numerical values of
Red,Blue, and Green.

The user can browse the colorsets by going from record to record in
the form. A subform displays the actual colors in the selected
set. The subform's recordset has fields for colorsetname [matched
to colorsetname in the form's recordset], sequenceNumber,
Redvalue,BlueValue and GreenValue, and a record for each color in
each colorset.

The subform displays 11 rectangles: the first n of these should
display the n colors assigned in the Redvalue,etc, fields in
sequence order. Those remaining will default to 'white'.
I've written a query that determines the color of each 'colored'
rectangle in the colorset. It takes as parameters the colorsetname and
sequenceNumber, but I don't know how to incorporate it into code
that will color each rectangle properly for a selected record.

I'd like to be able to do something like
RectsequenceNow.background = someprocess(R,G,B)
where R,G,B are the field values returned by
theQuery with parameters colorNow,sequenceNow determined by
current colorset record and current Rectangle.

thanks for any help,
--thelma

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ted
Thelma:
In the OnCurrent event for the sub form, each time you move to a
different record on the main form, the data in the subform changes
based upon the link criteria between the main form and sub form.
Try having the OnCurrent event modify the color values for each
rectangle, then requery/refresh the subform.
Ted

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.