Solved

Problems with form back color

Posted on 2000-03-03
6
125 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
Comment Utility
batches.backcolor = &H00FFFFFF&
0
 
LVL 10

Expert Comment

by:caraf_g
Comment Utility
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
Comment Utility
Very good Caraf G.. I forgot all about the VB color constants.. thank you for the reminder.. <smile>
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 10

Expert Comment

by:caraf_g
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now