Colour Control

G

Guest

I would like to set a textbox forecolour and backcolour in a report. This is
easy enough by using the property settings in design view for the report but
this is not the way I would like to do it.
If possible I would like to open a form, frmSetUp, and would like to two
buttons;
One button that opens a colour selection popup (Control) to set the
backcolour.
One button that opens a colour selection popup (Control) to set the
forecolour.
Then when I open the report it uses the saved colours in the title textbox.
The rest of the textboxes remain the same.

All help is appreciated

Regards
Nick
 
W

Wayne Morgan

Hopefully, this will help. It explains how to call the Windows Choose Color
dialog. You would then need to send the returned color numbers to the report
when you open it or have the report retrieve these color numbers from
textboxes on the form.

http://www.mvps.org/access/api/api0060.htm
 
S

Stephen Lebans

There is a newer version of that code here:
http://www.lebans.com/fontcolordialog.htm
ChooseFontColorDialog.zip is a database containing functions showing how
to call the API Font and Color Dialogs.

NEW - Jan. 28/2000 The Font and Color Dialogs are very easy to call.
Here is the code behind the Command Button on the sample Form. For this
sample we pass a TextBox that the function fills in with the Name and
Size of the Font selected by the user.

Private Sub CmdChooseFont_Click()
Dim lngRet As Boolean
' Pass the TextBox Control to the function
lngRet = test_DialogFont(Me.textCtl)
End Sub

Based on original code written by Terry Kreft.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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