i have to pass caption of a label to the data report label
can i do it

plzzzzzzzzzzzzz

urgent

Hi,

Create a module and initiate a variable as public ex:
Public lblCap as String.

Now on the form that contains the label, and on the button event that will open the report add:
lblCap = Me.label1.caption (where label is the label on form)

and once the report is opened add on activiate event the following:
Me.Label2.caption = lblCap (where label2 is the label on report)

If your label in the datareport is in the section2 then

DataReport1.Sections(section2).Controls("Label1").Caption="My Report"

ohhh thank you jureh

but today time up

will try it tomorrow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.