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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get subform value

Status
Not open for further replies.

Tom123456

Programmer
Apr 2, 2003
70
SE
Hello, lots of questions today.
I have a checkbox in a form. The form also contains a button that generates a report. The report contain a subform that has a textbox called Price. How do I change the color of the text, Am I on the right way??

(chkColor is a checkbox)

On the On open event in the report, this code runs:

If (Forms!GenerateReportForm!chkColor = True) Then
TheSubForm!Price.ForeColor = vbGreen
End If



- Tom
 
yep that should work!
try if chkcolor = true then
or if that dont work chkcolor =-1
 
Thanks for your answer GuitarDave78 But the question was (my fault) how do I set the color of the text, in other words how do i access the textfield and set Forecolor to green?

- Tom
 
It doesn´t work, Error 2455. I will try to translate the error message into english: "The expression has a failure to refer to the property of Form/Report"

- Tom
 
can the problem be that the mainform is a report?

- Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top