>>>CAN ANY BODY PLEASE TELL ME WHAT IS CODE FOR PRINT BOTTON.
>>>I MADE A FORM AND I WANT TO PRINT THAT.
>>>THANKS
>>
>>Hi Mohammed,
>>
>>It depends on what do you want to print. If you want to print the form itself (like Print Screen does), it's not easy. You may try two files from Files section here (I haven't tried them yet): George Tasker's and another one (Rick Strahl ?)
>>
>>If you wan to print table records, you have to create a Report first.
>>Then your Print button would have code like:
>>report form myReport to printer noconsole.
>
>if you quickly need to send table records to a printer ....
>a command like "LIST TO PRINTER" will do the job without a REPORT defined.
>Its ugly but it has its uses.
>
>the "DISPLAY" command can also be used for certain things without requiring a REPORT defined.
>
>HTH
Hi Dave,
Yes, but as you said, it would look ugly. I have another quite universal solution for tables with few fields (not greater than 7-10). This code I use in the 'general' form, which can work on any passed table (basically, these tables have just 3-4 fields).
local lcReportName
lcReportName='Reports\TableMaint'
set safety off
set notify off
select TableMstr
create report (lcReportName) from alias() column
dodefault()
If it's not broken, fix it until it is.
My Blog