views:

18

answers:

1

Hello!

i'm very new to Access and VB, and im about to print a specific record.. but im getting an error with this code:

Private Sub printEksternAVR_Click()
DoCmd.OpenReport [Report_AVR Ekstern], acViewPreview, , [Report_AVR Ekstern].Rapport_nr = Forms!Form_AVR

End Sub

My reports name is AVR Ekstern, and the prime key is Rapport nr and the form im clicking the button and viewing the record in, is AVR

i think i misunderstood something alon the way, so i really hope someone can help me out here?

A: 
bob-the-destroyer
okay Thanks alot, i got it to work :P
Ilizane
oh, btw, is there any way to "force" my report to print out the "layout" wven if the fields are empty, like in if i only filed some of the data but not all, it would stil print out my supreports? i have liek one report, which is allways there.. and 8-9 supreports where they not allways will be filled, but will be send out to a customer and filled manualy, and the send back ? is there any easy way of doing so? (manualy speaking of a doc,docx,dot,rtf or whatever they can write in - as NOT in pdf)
Ilizane
You mean if there's no data in those subreports, instead print empty boxes in place of all fields? A certain control property comes to mind, but I can't think of it at the moment and I'm not near my windows machine to test it. Not sure.
bob-the-destroyer