Add a yes/no field to your table. When they submit the report update this
field to True.
Then you can change the allow edits, allow deletions property for the form
to No, if the value of this field is true.
You would set these properties in the current event for the form.

Signature
Joan Wild
Microsoft Access MVP
> Hello all
>
[quoted text clipped - 16 lines]
>
> Thanks in advance
erick-flores - 07 Nov 2006 20:34 GMT
> Add a yes/no field to your table. When they submit the report update this
> field to True.
[quoted text clipped - 7 lines]
> Joan Wild
> Microsoft Access MVP
Thanks for your answer that looks like it should correct my problem.
But I am having trouble writing the right code. Can you please give me
more details of the actual code I need to put behind my forms.
I have a form(A) and a subform(B). A has the button that submit the
report, B has the expense information.
How do I modify a subform from a form? this is what I tried:
Forms![Expense Reports Subform].Yes_No_field.Enabled = True
And its not working, what I am doing wrong?
Thank you
Joan Wild - 07 Nov 2006 20:51 GMT
Include in the code to open the report.
Me![YesNoField] = True
Me.Dirty = False
DoCmd.OpenReport etc.
In the current event for the main form:
If Me![YesNoField] = true then
Me.AllowEdits = false
Me.AllowDeletions = false
else
Me.AllowEdits = True
Me.AllowDeletions = True
End If

Signature
Joan Wild
Microsoft Access MVP
>> Add a yes/no field to your table. When they submit the report
>> update this field to True.
[quoted text clipped - 20 lines]
>
> Thank you
erick-flores - 07 Nov 2006 21:25 GMT
Thanks for your help, that code with a few changes did it.
I have a final question. Everything is working fine, but it is only
checking (the yes/no field) one of the records. This is kinda what I
have:
Expense Date Expense Category Description Reimb Co.
Paid YesNoField
2/2/2002 Business Dev testing
23.34 (+)
2/3/2002 Meal testing
34.34 ( )
I press the submit button and...
It will check the record that is selected but it will not check all the
records-all the expenses, you know what I mean? In the example above it
only check (the YesNoField) the first record. So my question is How do
I checked all the records at the same time?
Any ideas? Thank you
Joan Wild - 07 Nov 2006 22:14 GMT
I was thinking you'd put the yes/no field in the main form's recordsource -
afterall the 'submitted' applies to it doesn't it?

Signature
Joan Wild
Microsoft Access MVP
> Thanks for your help, that code with a few changes did it.
>
[quoted text clipped - 16 lines]
>
> Any ideas? Thank you
erick-flores - 07 Nov 2006 22:44 GMT
Finally got it to work. Thank you very much!