Hi Forum, 2010 accdb.
I have form with a command button that starts a function.
The function may require another form to open and when finished, you return to the original form and click the command button for the function to restart from where it was stopped - all works fine.
What I would like is that you don't need to click the button again.
I think this code should do it
But I can't get it to fire.
Tried GotFocus and Activate but appears to not "fire"
Also tried this code on the closing form
Thought here is the function will start and the form will close leaving the original form open but again, doesn't appear to work.
Appreciate any advice
I have form with a command button that starts a function.
The function may require another form to open and when finished, you return to the original form and click the command button for the function to restart from where it was stopped - all works fine.
What I would like is that you don't need to click the button again.
I think this code should do it
Code:
If TempVars!CalcLateFees = "BulkLateFees" Then
'restart fncBulkLateFees
fncBulkLateFees
Else
'do nothing
End If
Tried GotFocus and Activate but appears to not "fire"
Also tried this code on the closing form
Code:
If TempVars!CalcLateFees = "BulkLateFees" Then
fncBulkLateFees
DoCmd.Close
Else
DoCmd.Close
End If

Appreciate any advice
