M
Morris
Hi,
I seem to be stuck and although I'm still looking for a solution I
decided I'll give it a try and ask you for help as well.
I've got this function: (I've numbered the lines here, they don't
exist in the real project)
It's supposed to open a form with one textbox (txtNewGCostAccepted)
and one button (cmdConfirm)
The user is supposed to type the new cost, press confirm and what I
want then to happen is for the function fncNewGrossCost to be able to
check what the value was - and return it to the invoking function.
And somehow I can't make it work. I decided I'd need to use the
acDialog parameter to stop code execution. I've read somewhere on this
group that the onClick event of cmdConfirm button should say:
Me.Visible = False
which should be enough to make the code execution continue from line 3
of the above mentioned function.
Is this the correct approach?
I seem to be stuck and although I'm still looking for a solution I
decided I'll give it a try and ask you for help as well.
I've got this function: (I've numbered the lines here, they don't
exist in the real project)
Public Function fncNewGrossCost() As Long
1:
2: DoCmd.OpenForm "frmNewGCost", acNormal, , , , acDialog
3: fncNewGrossCost = Nz(Forms("frmNewGCost").txtNewGCostAccepted, 0)
4: DoCmd.Close acForm, "frmNewGCost"
End Function
It's supposed to open a form with one textbox (txtNewGCostAccepted)
and one button (cmdConfirm)
The user is supposed to type the new cost, press confirm and what I
want then to happen is for the function fncNewGrossCost to be able to
check what the value was - and return it to the invoking function.
And somehow I can't make it work. I decided I'd need to use the
acDialog parameter to stop code execution. I've read somewhere on this
group that the onClick event of cmdConfirm button should say:
Me.Visible = False
which should be enough to make the code execution continue from line 3
of the above mentioned function.
Is this the correct approach?