continuous form showing colors

M

Mark Andrews

Access2000 format.

I have a simple table that holds (colorname and colorvalue) and I would like
to build a form so that users can add/edit or delete from this table.

I put together a quick continuous form showing the name, value and a button
to bring up the color dialog box.

Two things I would like to happen:
1. on loading a text box background color gets set to the color value field
2. the user could change this color value by clicking the button and
selecting from the color dialog

Example:
The form would look like this


red [textbox with red background] button....
blue [textbox with blue background] button....
green [textbox with green background] button....
....

They might have 12 colors that are setup and decide to add 3 more.

This list of colors then drives a combo box used within the program.


Help on anyway to make this happen is very appreciated,
Mark
 
M

Mark Andrews

Thanks very nice example program for the flex grid ocx!

Would you know of anyway to accomplish this without an ocx?

Mark
Peter Hibbs said:
Mark,

A Flex Grid Control will probably do what you want but you will need
to write a bit of VBA code, have a look at my Flex Grid Demo program
for some examples.

Go to http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=180

HTH

Peter Hibbs.


Access2000 format.

I have a simple table that holds (colorname and colorvalue) and I would
like
to build a form so that users can add/edit or delete from this table.

I put together a quick continuous form showing the name, value and a
button
to bring up the color dialog box.

Two things I would like to happen:
1. on loading a text box background color gets set to the color value
field
2. the user could change this color value by clicking the button and
selecting from the color dialog

Example:
The form would look like this


red [textbox with red background] button....
blue [textbox with blue background] button....
green [textbox with green background] button....
...

They might have 12 colors that are setup and decide to add 3 more.

This list of colors then drives a combo box used within the program.


Help on anyway to make this happen is very appreciated,
Mark
 
D

Douglas J. Steele

The only way with a continuous form would be to use Conditional Formatting,
and you're quite limited as to how many different colours you can display
that way.

The problem is that while it may look like you have, say, 30 different text
boxes, in actual fact you've only got one, repeated 30 times. That means
that if you use VBA to set the BackColor property of the text box, it
applies to all 30 instances.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Mark Andrews said:
Thanks very nice example program for the flex grid ocx!

Would you know of anyway to accomplish this without an ocx?

Mark
Peter Hibbs said:
Mark,

A Flex Grid Control will probably do what you want but you will need
to write a bit of VBA code, have a look at my Flex Grid Demo program
for some examples.

Go to http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=180

HTH

Peter Hibbs.


Access2000 format.

I have a simple table that holds (colorname and colorvalue) and I would
like
to build a form so that users can add/edit or delete from this table.

I put together a quick continuous form showing the name, value and a
button
to bring up the color dialog box.

Two things I would like to happen:
1. on loading a text box background color gets set to the color value
field
2. the user could change this color value by clicking the button and
selecting from the color dialog

Example:
The form would look like this


red [textbox with red background] button....
blue [textbox with blue background] button....
green [textbox with green background] button....
...

They might have 12 colors that are setup and decide to add 3 more.

This list of colors then drives a combo box used within the program.


Help on anyway to make this happen is very appreciated,
Mark
 
P

Peter Hibbs

Mark,

Not that I know of with a Continuous type form. As Douglas has pointed
out, using Conditional Formatting you can only use three different
colours.

Is there some reason that a Flex Grid control will not work for you?

Peter Hibbs.

Thanks very nice example program for the flex grid ocx!

Would you know of anyway to accomplish this without an ocx?

Mark
Peter Hibbs said:
Mark,

A Flex Grid Control will probably do what you want but you will need
to write a bit of VBA code, have a look at my Flex Grid Demo program
for some examples.

Go to http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=180

HTH

Peter Hibbs.


Access2000 format.

I have a simple table that holds (colorname and colorvalue) and I would
like
to build a form so that users can add/edit or delete from this table.

I put together a quick continuous form showing the name, value and a
button
to bring up the color dialog box.

Two things I would like to happen:
1. on loading a text box background color gets set to the color value
field
2. the user could change this color value by clicking the button and
selecting from the color dialog

Example:
The form would look like this


red [textbox with red background] button....
blue [textbox with blue background] button....
green [textbox with green background] button....
...

They might have 12 colors that are setup and decide to add 3 more.

This list of colors then drives a combo box used within the program.


Help on anyway to make this happen is very appreciated,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top