records and reports ???

UOUO

New member
Local time
Tomorrow, 02:13
Joined
Jul 27, 2009
Messages
9
hello,

I want to ask if I can make for each record in my form, a word report that open automatically if I press button or anything like that.

for example when I move from record one to record two, I will find the report of record on not two.

the pictures will explain it better

Picture 1

Picture 2

If there is anything unclear, pleas ask me :)
 
GooD morning, yes it's very clear you need to send a filter of your data from the form along with the report name in the DoCmd.OpenReport command...
As I see in your Pic:
To show all records.. sipmly...and for example report name is "StdRept"
Code:
  DoCmd.OpenReport "StdRept", acPreview
But to open the same report only on the "Current record" in the form fror exampl StdForm...
Code:
    DoCmd.OpenReport "StdRept", , ,"[StdID]=Forms![StdForm]![StdID]", acPreview
Where:
StdId is the student ID in the table and th form....AND THE "Forms![StdForm]![StdID]" is to reach the StdID data field in the form...
Regards....
HAMMAM
 
Thank you Mr.HAMMAM

actually, I have access 2007 and I don't know how the codes used :(

I hope if you can explain it to me pleas :o
 
1-simply go to the form's design, right click on the button you wanna programme, a menu will appear, choose the very first item "Build Event" another menue to choose the type of command, choose the third "code builder" the code window will open exactly on the buttons code...not very much difference from 2003
2-Or, if you Double Click the button, the right side of acces window will show the properities list, go to the Event tab, choose the appropriate event, here it's a button so On Click is the one we want...
any problems just post a not,,,
Good Luck
 
Sorry Mr.HAMMAM, I tried to do it but I couldn't.
I found code builder and I added the code but the button doesn't work !!!:(

I hope if you can make a small database and upload it here with the report button please
 

Users who are viewing this thread

Back
Top Bottom