Solved

Problems with form back color

Posted on 2000-03-03
6
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

734 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