Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird Text 'ForeColor' Problem...Any Suggestions? 1

Status
Not open for further replies.

Shokoya

IS-IT--Management
Aug 4, 2003
81
GB
Hi Guys,

Got this weird problem...

Wen I enter the following coding (to change a texts color) on its own, into a Reports 'OnOpen' event it works fine;
Me.Actual_Start_Date.ForeColor = 65280

However, as soon as I enter it as part of an If Statement on the same event;

If Forms![Actual Search].Form![OptStart] = 1 And Forms![Actual Search].Form![OptEnd] = 1 Then
Me.RecordSource = "Early_Early"
Me.Actual_Start_Date.Fore Color = 65280
Me.Actual_End_Date.Fore Color = 65280
End If


It no longer works. Does anybody know why this might b??

[cheers]
 
It look like yourIf statement returns false or null. Or do you get an error message? Check if the value property of the option buttons is really set to 1. If they are radio buttons in a group, they can be set to give any value you like. If they are loose checkboxes, they return
Code:
True
,
Code:
False
or
Code:
Null
.

Best regards
 
Try to move the whole block to your "Form_Current()" event.
Besides that:
Forms![Actual Search].Form![OptStart] = 1
Is your form "Actual Search" still open or do you close it before opening this form?
In the latter case you cannot reference it.

MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
Bowne Global Solutions Wuppertal, Germany
(andreas.galambos@bowneglobal.de)
HP:
 
Forgot to adjust the Forms![Actual Search].Form![OptStart] value in acordance to the If statement....

Cheers for jogging the memory Don!

[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top