PC Review


Reply
Thread Tools Rate Thread

Acc2002 CanGrow

 
 
katz
Guest
Posts: n/a
 
      13th Nov 2006
Hello!
I have an interesting problem. I have a Unbound control on a report and the
control doesn't grow if the data is more then the box could fit. But when I
go to design view and preview again then it works. Is there anything I can
Do?

Thanks in advance


 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      13th Nov 2006
How do you populate the Unbound Control on the Report? Which Event do you
use to run the code to populate the Unbound Control?

I think in the Report processing, Access will adjust the size the the
TextBox just before the Format Event of the Section, IIRC.

--
HTH
Van T. Dinh
MVP (Access)



"katz" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello!
> I have an interesting problem. I have a Unbound control on a report and
> the control doesn't grow if the data is more then the box could fit. But
> when I go to design view and preview again then it works. Is there
> anything I can Do?
>
> Thanks in advance
>
>



 
Reply With Quote
 
Larry Linson
Guest
Posts: n/a
 
      13th Nov 2006
"Van T. Dinh" wrote

> How do you populate the Unbound Control
> on the Report? Which Event do you use
> to run the code to populate the Unbound
> Control?
>
> I think in the Report processing, Access will
> adjust the size the the TextBox just before
> the Format Event of the Section, IIRC.


It's kind of difficult to execute code to populate the unbound Control
_before_ the Format event of a Report Section, isn't it? There are only
Format and Print events, and Print runs after the Format.

I think the definitive answer is "Don't count on CanGrow / CanShrink with
unbound Controls."

Larry Linson
Microsoft Access MVP


 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      14th Nov 2006
Hi Larry

I think it is possible, e.g. Report_Open Event ...

I can't find any code setting TextBox value at present but I actually
changed the Cation on generic Labels in the Detail Section using the
Report_Open Event. Here a tidbit of code in the Open_Event of one of my
Reports:

********
...
If lngRecordCount > 0 Then
intSRptIndex = intSRptIndex + 1
strSRptIndex = Format$(intSRptIndex, "00")
Select Case bytMachPosID
Case fnMachPosID("EXT_C")
.Controls("lblMach" & strSRptIndex).Caption = " Core
Extruder" & _
(" (" + rsBRMachine.Fields("MachModelName").Value + ")")
& " General Settings"
.Controls("srptMach" & strSRptIndex).SourceObject = _
"Report.rsrBestRun_MachineParam_ExtruderCore"

Case fnMachPosID("EXT_S")
.Controls("lblMach" & strSRptIndex).Caption = " Skin
Extruder" & _
(" (" + rsBRMachine.Fields("MachModelName").Value + ")")
& " General Settings"
.Controls("srptMach" & strSRptIndex).SourceObject = _
"Report.rsrBestRun_MachineParam_ExtruderSkin"

Case fnMachPosID("EXT_ST")
.Controls("lblMach" & strSRptIndex).Caption = " Striping
Extruder" & _
(" (" + rsBRMachine.Fields("MachModelName").Value + ")")
& " General Settings"
.Controls("srptMach" & strSRptIndex).SourceObject = _
"Report.rsrBestRun_MachineParam_ExtruderStripe"

End Select
End If
DoEvents
....
********

--
Cheers
Van T. Dinh
MVP (Access)



"Larry Linson" <(E-Mail Removed)> wrote in message
news:O1i$(E-Mail Removed)...
>
> It's kind of difficult to execute code to populate the unbound Control
> _before_ the Format event of a Report Section, isn't it? There are only
> Format and Print events, and Print runs after the Format.
>
> I think the definitive answer is "Don't count on CanGrow / CanShrink with
> unbound Controls."
>
> Larry Linson
> Microsoft Access MVP
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Acc2002 - Form/subform ericaz511@gmail.com Microsoft Access Form Coding 0 12th Jun 2007 05:26 AM
Acc2002 - Form/subform ericaz511@gmail.com Microsoft Access Form Coding 0 12th Jun 2007 05:25 AM
Access97 To Acc2002 katz Microsoft Access Forms 0 7th Nov 2006 09:52 PM
example using Enum in Acc2002? Ted Microsoft Access 2 18th Mar 2005 04:31 PM
Add a task to Outlook using Acc2002 TC Microsoft Access VBA Modules 4 11th Nov 2003 04:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 PM.