Allow Edits

A

Ann

Hi, I'm hoping someone can help me. I created a form frmDRSJobs and a sub
subfrmDRSJobsByOperator. I have the code listed below on the main form's
Current event to change the Allow Edits property. It works fine for the main
form but the subform tells me it's not updateable but still allows me to
enter data that will be added to the table. How do I get the Allow Edits on
the subform to change? Thanks.

Private Sub Form_Current()

If Me.dtmClosedDate <> "" And Me.ysnLockedRecord = True Then
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If

End Sub
 
L

Linq Adams via AccessMonster.com

Two things:

First, exactly how does the subform tell you taht it's not updateable?

Secondly, do you realize that the line

If Me.dtmClosedDate <> "" And Me.ysnLockedRecord = True Then

will fire if no data has been entered into dtmClosedDate and ysnLockedRecord
= True?

Null (no data entered) and "" (a zero-length string) are not the same.
 
A

Ann

When I click the drop down to choose a name from the list I'm told I can't
update the record. Then it proceeds to accept the one I chose and allows me
to finish the information in the row and add it to the table.
 

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