[AccessD] Phantom report printing

RANDALL R ANTHONY RRANTHON at sentara.com
Fri Apr 9 10:31:13 CDT 2010


Sometimes just talking out loud does the trick, ...knowhutImean? ;)

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Clark
Sent: Friday, April 09, 2010 11:25 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Phantom report printing

I think I've found it...how many times to I find my own answer, only after giving up and writing to the list? Lots is the answer ;o)
 
It turns out, I just need to get out a little more...I was over thinking things greatly it appears. I'm looking all over code, and it looks like it is just a property..."Hyperlink Address"
 
I can't tell you how long I've been going down the wrong road on this one. I am used to doing everything through code...I like code. I'm actually a little embarrassed here. Sorry to bother y'all...carry on!
 


>>> "John Clark" <John.Clark at niagaracounty.com> 4/9/2010 11:11 AM >>>
I just inherited a program that I've been asked to massage it into working for our needs. It came from another county, and I have to make it work for us. This shouldn't be a big deal, and I actually stated that I could do this pretty quick, but now I am stuck on a simple report. This is calling a MS Word doc.

If you click the button to print a "lost certificate" you get an error saying it can't find "<path>\Lost Certificate.doc"

This made total sense to me, because the <path> was alien to me, and it came from another county, so I figured I just had to get into the code and change it to our own path and file. But, what I thought was going to be a 5 min. job, is really eating up my time, because I can't find this code anywhere. There isn't a single Module in this program, so it isn't that. There are only 2 macros, and it doesn't look to be either of those. So, it is simply VBA behind the button right? Doesn't look that way.

The button on the main form calls a subform...




The subform is very small, having only 14 basic fields (name and address stuff...just the basics). On Open this form only does this:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToControl "Certificate"
[Certificate] = True
Me.Refresh
End Sub

There is a print button...well it has to be here right? Wrong...here is the code for that:

Private Sub WordBtn_Click()
Me.Refresh
End Sub

The only other code for the form is a expiration date, which is 365 days added to a cert date. And, then there is code On Close for the form. I figure it has to be here, but this is all that is there:

Private Sub Form_Close()
DoCmd.SetWarnings Off
DoCmd.OpenQuery "ClearCerticate"
End Sub

And, the query code is this...it is an update query:

UPDATE DISTINCTROW Colleges SET Colleges.Certificate = False
WHERE (((Colleges.Certificate)=True));

The only thing that is odd for me...I've never actually printed an MS Word form from Access...is this, at the top of the code for the form:

Option Compare Database   'Use database order for string comparisons
  Dim DocObject As Object
  'Holds a reference to a winword object

I doubt this is what I am looking for, but what kind of reference are they talking about...is it my path and name? And, where is this thing? The only place I see this reference in this code, is for a non-excitant control...the code hasn't been cleaned up for past controls.

I haven't had something stump me like this in quite a while, and I would really appreciate any help given. I can pass along any code or anything that anyone needs.

Thanks J Clark
-- 
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list