on close event of a report

R

richard harris

hi all,

i am trying to update a chk box on a form on a close event of a report. the
idea is that the adviser can confrim that he has issued a confimratin letter
to a client, when the report closes, this will then update a hidden chk box,
which will then inturn identify that the letter has been issued.

here is the code

Private Sub Report_Close()

If vbYes = MsgBox("Have you issued the roS to your client?", _
vbQuestion + vbYesNo + vbDefaultButton1, "RoS Issued?") Then
Me([Forms]![frmfinancialreview]![rosIssued]) = True
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = Date
Else
Me([Forms]![frmfinancialreview]![rosIssued]) = False
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = ""
MsgBox "you must issue the Ros before you can submit this case", vbOKOnly +
vbwarning, _
"RoS not issued!"
End If

End Sub

can you please help!!!! thanks richard
 
J

Jeff L

I'm assuming you are having an issue with setting the values on your
form.
Its [Forms]![frmfinancialreview]![rosIssued], not
Me([Forms]![frmfinancialreview]![rosIssued]).

Hope that helps!
 
R

richard harris

hi jeff,

that worked perfect. i have another problem withthe same issue, but htis
time i am trying to set the value to a subform.

it works ok if the form is open on its own, but not when it is a subform.

would it be ([forms]![mainform]![subform]![control]

thanks very much

Jeff L said:
I'm assuming you are having an issue with setting the values on your
form.
Its [Forms]![frmfinancialreview]![rosIssued], not
Me([Forms]![frmfinancialreview]![rosIssued]).

Hope that helps!

richard said:
hi all,

i am trying to update a chk box on a form on a close event of a report. the
idea is that the adviser can confrim that he has issued a confimratin letter
to a client, when the report closes, this will then update a hidden chk box,
which will then inturn identify that the letter has been issued.

here is the code

Private Sub Report_Close()

If vbYes = MsgBox("Have you issued the roS to your client?", _
vbQuestion + vbYesNo + vbDefaultButton1, "RoS Issued?") Then
Me([Forms]![frmfinancialreview]![rosIssued]) = True
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = Date
Else
Me([Forms]![frmfinancialreview]![rosIssued]) = False
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = ""
MsgBox "you must issue the Ros before you can submit this case", vbOKOnly +
vbwarning, _
"RoS not issued!"
End If

End Sub

can you please help!!!! thanks richard
 
J

Jeff L

Yup you got it! What do you need me for? :)


richard said:
hi jeff,

that worked perfect. i have another problem withthe same issue, but htis
time i am trying to set the value to a subform.

it works ok if the form is open on its own, but not when it is a subform.

would it be ([forms]![mainform]![subform]![control]

thanks very much

Jeff L said:
I'm assuming you are having an issue with setting the values on your
form.
Its [Forms]![frmfinancialreview]![rosIssued], not
Me([Forms]![frmfinancialreview]![rosIssued]).

Hope that helps!

richard said:
hi all,

i am trying to update a chk box on a form on a close event of a report. the
idea is that the adviser can confrim that he has issued a confimratin letter
to a client, when the report closes, this will then update a hidden chk box,
which will then inturn identify that the letter has been issued.

here is the code

Private Sub Report_Close()

If vbYes = MsgBox("Have you issued the roS to your client?", _
vbQuestion + vbYesNo + vbDefaultButton1, "RoS Issued?") Then
Me([Forms]![frmfinancialreview]![rosIssued]) = True
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = Date
Else
Me([Forms]![frmfinancialreview]![rosIssued]) = False
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = ""
MsgBox "you must issue the Ros before you can submit this case", vbOKOnly +
vbwarning, _
"RoS not issued!"
End If

End Sub

can you please help!!!! thanks richard
 
R

richard harris

hi jeff,

thanks very much. this now allows me to do so many things i havent been
able to do as i didnt know how to pass a value to another unrelated form.

thanks again.

richard

Jeff L said:
Yup you got it! What do you need me for? :)


richard said:
hi jeff,

that worked perfect. i have another problem withthe same issue, but htis
time i am trying to set the value to a subform.

it works ok if the form is open on its own, but not when it is a subform.

would it be ([forms]![mainform]![subform]![control]

thanks very much

Jeff L said:
I'm assuming you are having an issue with setting the values on your
form.
Its [Forms]![frmfinancialreview]![rosIssued], not
Me([Forms]![frmfinancialreview]![rosIssued]).

Hope that helps!

richard harris wrote:
hi all,

i am trying to update a chk box on a form on a close event of a report. the
idea is that the adviser can confrim that he has issued a confimratin letter
to a client, when the report closes, this will then update a hidden chk box,
which will then inturn identify that the letter has been issued.

here is the code

Private Sub Report_Close()

If vbYes = MsgBox("Have you issued the roS to your client?", _
vbQuestion + vbYesNo + vbDefaultButton1, "RoS Issued?") Then
Me([Forms]![frmfinancialreview]![rosIssued]) = True
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = Date
Else
Me([Forms]![frmfinancialreview]![rosIssued]) = False
Me([Forms]![frmfinancialreview]![rosIssuedDate]) = ""
MsgBox "you must issue the Ros before you can submit this case", vbOKOnly +
vbwarning, _
"RoS not issued!"
End If

End Sub

can you please help!!!! thanks richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top