Readonly form after data is entered

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

Hi I have a form I would like the user to be able to enter data the first
time then the next times they open the form it's read only. I know I posted
this question before but I can't seem to find it. Sorry for posting twice.
 
Hi Emma,

How about setting the form's Allow Edits property to No? As long as
Allow Additions is set to Yes, it allows for new records to be added and
edited, but existing records cannot be changed. You may also want to change
the Allow Deletions property.

Clifford Bass
 
Hi Clifford, I tried what you said but it doesn't work. Is there some other
setting I'm missing?
 
Here's the code I have that should run before the user enters a new form,
then I want it to be read only

Private Sub Form_Load()
If IsNull(Me![3M Worker]) Then
Me![3M Worker] = CurrentUser
End If
Me![Follow Up Date 3M] = Date
End Sub
 
Hi Emma,

I think I need a clarification. I was assuming that you wanted to
allow the user to add records, but not modify them. But as I reread your
first post it sounds like you want the user to be able to enter something
only ONCE; the FIRST time the user opens the form. And thereafter, NEVER
again, no matter how many times the user opens the form, to be able to make
any changes or add any new records. Is that accurate?

Clifford Bass
 
Hi Emma,

Not sure I was any help. But if you got it to work, that is the
important thing.

Clifford Bass

Emma said:
Yes that's correct. I think I solved the problem by doing this
Private Sub Form_Load()
If IsNull(Me![3M Worker]) Then
Me![3M Worker] = CurrentUser
Me![Follow Up Date 3M] = Date
End If
End Sub
It seems to work fine now thanks
 
Back
Top