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

Report Question

Status
Not open for further replies.

Holm78

Programmer
Mar 5, 2002
60
SE
Hi all!!

I have this form with a bunch of buttons, and when I press a button a specific text apear in a label.
On my report I have a field and in that field I want the same caption as the forms label depending on witch button that was pressed.
How do I make this? Do i put a code in the field on the report or do I need to send it from the form?

Thanks

//Holm
 
Hi Holm

A public variable should do it.

Simply declare your public variable. Set the variable to the various strings in your buttons and then set a text boxs expression property in the report to your variable.

Hope this helps

Chris
 
Or, use something like:

Form1.Label1.Caption

as the expression for the field.

Dave S.
 
Whenever I need to reference any form properties from outside the form, I always

DO FORM myform NAME myform LINKED

This way you have an object reference to the form and can then reference myform.label.caption in the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top