Opening color pallet from a command button and store the value

C

cmarsh

I want to open the color pallet from a command button, select a color, then
store that value in a string.
What is the best way of doing this? Thanks in advance.
 
C

cmarsh

Let me rephrase

1. Have a comand button to open the color pallet
2. The value selected, stored in a table with the user login
table = tbllog
user field = struser
color field = strcolor
3. When a certain user logs in, the value stored can be pulled from the
table (listed above), put into a string (lngcolor), so it can be used to
change the color of, lets say the back color of a form upon load.

Thanks again!!
 
C

cmarsh

ok, got most of it.

The question now is how can i store that value to a table so it can be
called upon everytime the user logs in?
 
P

Peter Hibbs

Well that depends how you are accessing your table. If you have this
code on a form which is bound to the relevant record in the table you
could just write it back to the field using VBA code.

If you have not got direct access to the table you could use a bit of
SQL code to write the data to the required record using an UPDATE
function. You would need to have some way to identify the relevant
record in the table, say a unique field value like an AutoNumber value
or an indexed field.

Incidentally, it sounds as if you are storing the color value in a
string (or Text type field), normally you would use a Long Integer
type field to store this information (although it would probably work
in a Text field).

Peter Hibbs.
 

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