Do I need a vba-access code to insert digital signature (digital certificate) in a report, Someone help!?

Of course, Colin, when the test evaluates to false the false part of the IIf() (error part) is evaluated!

My point is, when you try the whole expression in VBA the false part throws the error even when the test = True, but no runtime error is thrown when used in a query
 
Of course, Colin, when the test evaluates to false the false part of the IIf() (error part) is evaluated!

My point is, when you try the whole expression in VBA the false part throws the error even when the test = True, but no runtime error is thrown when used in a query
Yes I understood that in the first place
 
OK, I need to revise what I'm saying a bit.

As June points out, both parts of the IIf() are always evaluated whether used in a query or in VBA.

But when used in a query, the runtime error isn't thrown provided the part throwing the error doesn't throw a VBA error.

Clear as mud!

I think I'll just get my coat.
 
I am NOT saying it evaluates both parts in query. Read my responses again.

In query, it's only evaluating the False when the True condition is not met, otherwise the Y record would show error (which does in VBA).

Or, as you say, maybe it does evaluate but ignores error if it is not the result to return. (6 of 1 half dozen of another - however you describe the behavior, same outcome)
 
Last edited:
As June points out, both parts of the IIf() are always evaluated whether used in a query or in VBA.

But when used in a query, the runtime error isn't thrown provided the part throwing the error doesn't throw a VBA error.

Clear as mud!
No. June has it correct. Iif() in a query only evaluates the when False expression if the test condition returns False. The VBA function evaluates both sides regardless of the test.

Iif() used in a query won't return a VBA error because it isn't a VBA function. Iif() in a query uses the Iif() function in the database engine. It behaves differently from the VBA Iif() because it is a completely different function that happens to have the same name as a VBA function.

There are several functions native to the engine that have the same names as VBA functions. They are not the same functions.

I hope that is crystal clear now.

(I didn't imagine an aside about Iif() in a simple explanation of why Nz() behaves differently from other functions would generate so many posts.)
 
To work you have to install Acrobat Pro on your PC. And you have to have an A1 certificate on your PC, installed or not.
Shouldn't be a problem. Please post a sample file, if you can.
 
I created a bd just to test the codes, it still didn't work. It only worked, in part, when put "on error resume next", which created the pdf, inserted the certificate object, but left an empty signature. It was a line of code that didn't work ... see the attachment
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom