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

Passing args with OpenArgs Issues

Status
Not open for further replies.

pmessana

Programmer
Jan 24, 2003
19
0
0
US
Okay, i have had this problem before. When I check the OpenArgs in the receiving form(or report) they appear to be Null. What is wrong? The code is exactly like another one that I used to open a form.

Calling from CreateService form:
DoCmd.OpenReport "Print", acPreview, , , , 1

Receiving in Print report
strSvcTagID = Forms!CreateService.OpenArgs

Any suggestions would be great.
 
Try a different name first "Print" might be a reserved name

I would just write

strSvcTagID = Me.OpenArgs

what are you passing to the report?


 
I have tried that, no such luck - still NULL.

I am passing the recordID so i can print the record.
 
What is the value of the recordid right before the line

DoCmd.OpenReport "Print", acPreview, , , , 1

Set a variable with that value and pass the variable as your openarg.

 
The value is whatever is select on the form, I have hardcoded it to try to get it to work and then was going to replace with variable.

I have had this problem before with a form, rebuilt the form and it worked, then i modified and it stopped working, makes me wonder if something is up with Access.
 
Do you get any errors when you compile the database?

Give it a shot!!
 
Okay, that is freaky, i did a compact/repair and it works now....funky!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top