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

Report Data 1

Status
Not open for further replies.

fabby1

Technical User
Mar 9, 2004
206
0
0
GB
Hi

I have a snippet of code, that I use when I open a report

Code:
     Case "1A/B Horseshoe"
     Isl1 = Isl1 + !Duration
        Me.Duration_1A_B_Horseshoe.Visible = True
        Me.Count_1A_B_Horseshoe.Visible = True
  ****  me!Duration_1A_B_Horseshoe. = convtime(!Duration)
        Me.Count_1A_B_Horseshoe.Value = !Total
          If Me.Count_1A_B_Horseshoe.Value >= 1 Then
             Forms!DA_AVAILABILITY_SUMMARY.R1A_B_HorseshoeR.Visible = True
             Forms!DA_AVAILABILITY_SUMMARY.R1A_B_HorseshoeG.Visible = False
          End If


I get an error and the *** line hoe can I set a value in a text box on a report

Many Thanks

Phil
 
Set the value in the on format event of the section where the control resides (detail?, some header?).

Roy-Vidar
 
Roy

Thanks for the reply.

Maybe I need to explain myself more clearly.

I can make a control visible etc, but when I try and set it's value I get the following error

Me.Duration_1A_B_Horseshoe.Value = convtime(!Duration)

*** convtime is a function that converts the date
and time it runs this ok


Code:
Can't assign a value to this object

The report has no underlying recordsource as I create a recordset when I open the report, do some calculating and then want to populate the report with values.

Thanks

 
Yes, you can change several control properties in the reports on open event, but I still don't think you can alter the .Value. See my first reply for a suggestion on which event to use.

Roy-Vidar
 
Hey RoyVidar!!!

I had problems with "can't assign value to this object" in my unbound ctrl in header section and your solution got the goal in few seconds!!
after much time spent in "investigating" some tactics...

thanks very much!!
have a star!

greets,
Marko 9A6NCM

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top