dynamic creation of text boxes

  • Thread starter Thread starter Frank Mainzer
  • Start date Start date
F

Frank Mainzer

Hi list,

is it possible to dynamicly create text boxes in an access report?

thx

frank
 
only in design mode

what you can also do - place enough hidden textboxes on report and make
visible ones your need when you open report

Alex
 
Hi Frank,

You got the direct and correct answer from Alex. What are you trying to
accomplish? Is it just possible that a pivot table could solve your
problem?

HTH
 
...or you could try using some code similar to this

--------------------------------------------------------------------------------
Dim ctlLabel As Control

Set rp = CreateReport
rptName = rp.Name
boxWidth = 400
boxHeight = 500

For n = 1 To 20
For i = 1 To 32
ctlName = "posCtl" & i
Set ctlLabel = CreateReportControl(rptName, acLabel, , ctlName, "", boxWidth * i, n * boxHeight)
ctlLabel.Name = "n" & n - 1 & "d" & i - 2
ctlLabel.Width = boxWidth
ctlLabel.Height = boxHeight
ctlLabel.BackStyle = 1
Next
Next

' Restore report.
DoCmd.Restore
 
Back
Top