Solved

Problems with form back color

Posted on 2000-03-03
6
131 Views
Last Modified: 2010-05-02
Hi
i am trying to change the backcolor of my form from blue 2 white.
it is not changing
this is the code i am trying to use. I am able to change my labels and text boxes with the same method except fpr the form backcolor

batches.backcolor = &h0&

Thanx
Craig

0
Comment
Question by:CraigLazar
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
wsh2 earned 30 total points
ID: 2579316
batches.backcolor = &H00FFFFFF&
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2579650
OK, apart from the fact that you've specified black as the backcolour rather than white I don't see a major mistake - the colour should still have changed.

Perhaps you're working with an instance of the form, and an object variable, and in this case you accidentally used the form name?

e.g.

Dim frmX As frmMain
Set frmX = New frmMain

frmX.SomeButton.BackColor = vbWhite

frmMain.BackColor = vbWhite '<-wrong,
frmX.BackColor = vbWhite '<-correct

?
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2579666
Very good Caraf G.. I forgot all about the VB color constants.. thank you for the reminder.. <smile>
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Expert Comment

by:caraf_g
ID: 2595028
Craig, I don't understand how wsh2's suggestion solved your problem?

In your question you state that you do:
batches.backcolor = &h0&

But, when you try that
"it is not changing"

That doesn't make sense. The form should have changed, except it should have gone black instead of white.

So from the premise that you gave us correct information in your question it logically follows that wsh2's answer cannot be the correct answer to solve your problem.
0
 
LVL 4

Author Comment

by:CraigLazar
ID: 2595089
Hi cara_g
i am very sorry
i meant to ask u to post the answer but i was in a rush and only realised after i acepted the answer.
So i am gonna post another question for u only to answer and i will grade it. Sorry mate i am embarrased and sorry if i hacked u off.

thanx for the great help

Craig
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2595134
Not at all, Craig, I didn't mean to come across like that. I was genuinely confused as I couldn't work it out.

Thanks

Pino
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question