Can somebody help me with the Else If condition? I am confused.I need to build a function that asks the following questions
1. Shall i delete? If yes delete, if not proceed further
2. If i do no delete shall i print the document?
If yes, then it should ask print original or print not original?
if print original then an other code must be executed namely "visible invoice" and then the function Fncprint
if not original then open the report in preview and then execute the fucntion Print
3. If i do not want to delete nor to print,do i just open in preview mode?
if yes then i must ask original or not
if original then i must add the function visible invocie
However, when i want just to open the report, the function executes a print command.I am afraid my end if clauses are
so confused that i canotn see what is wrong.
Can somebody advise me of a better way for doing it?
Below is my function:
Public Function ProcessInvoice()
' the function is placed in the control CmdInvoices being the output for the ListInvoices
Dim f As Form
Set f = Forms![main]
If IsNull(f![list].Visible = True
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
If intPrint = vbYes Then