menthodology
May 2 2006, 04:36 PM
base on a tlb, a form and reports was already make, and the reports is a A4 Side page for each records, what i want to do was print the form in the report page setting but only the one on edit record to someone, that's means only one record need to print on the reports setting, can it possible to make it happen through insert a commond button on the forms, and how to achieve it?
HiTechCoach
May 2 2006, 06:29 PM
Try:
DoCmd.OpenReport "rptCustomers", A_PREVIEW, , "PrimaryKeyField=" Me.PrimaryKeyField
HiTechCoach
May 2 2006, 06:31 PM
kenick
May 2 2006, 06:56 PM
Boyd,
I've never seen the "A_PREVIEW". What does that do?
ken
menthodology
May 2 2006, 10:07 PM
thx.......
is that put on the on click events of the button?
kenick
May 3 2006, 07:04 AM
Yes, that would be in the OnClick. The part where he has ""PrimaryKeyField=" Me.PrimaryKeyField" you would need to substitute your actual field names for the "PrimaryKeyField", of course.
ken
Edited by: kenick on Wed May 3 8:15:09 EDT 2006.
kenick
May 3 2006, 08:00 AM
I tried looking up "A_PREVIEW" in the help file and came up with nada, but before I said anything about it I decided maybe I should just plug it in and see what happened. Well, of course it worked.
So really I'm just curious. Is that an older but still supported way of doing the report, or is it newer?
ken
menthodology
May 3 2006, 10:10 AM
since it only a work after work project(ar.....work after work means some stupid staff suggest: why not we do it that way.......then the boss said:sure! why not! but you can only do it not affecting normal duty, so stupid staff have to do it after nornal work......), i will try it, but , as you methion, if the above OnClick is one of the option, is that any other i can consider to.........
after all, its still have fun on making that database, i've have got more than what i give in the process........i learn!
fruther many thx for all.....
HiTechCoach
May 3 2006, 04:55 PM
QUOTE
So really I'm just curious. Is that an older but still supported way of doing the report, or is it newer?
Yes. "A_PREVIEW" was from a previous version of Access. I think was originally 97. I have been working with Access since the first version and the code in my code library has some older syntax.
kenick
May 3 2006, 06:33 PM
Thanks Boyd. I started working with 97, but only did basic stuff. I don't remember if I started learning VBA with 97 or if it was 2000. I would make buttons with a wizard to open a report and never look behind them. There's a good chance I was using "A_PREVIEW" and just didn't know it.
ken
menthodology
May 3 2006, 09:53 PM
just try it and work..........thx , many, many thx, .........
menthodology
May 3 2006, 09:54 PM
i just try and it works, thanks to you too....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.