Read Only Form Version (1 Viewer)

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
Hello,


On my Main Form (database open) click on the 'Research'.


This form is intended to be read only including the AFRs Parts tab.


On AFR Number 88942 which has Status "Open" the AFRs Parts can be edited but should not be.


Is there a way to not allow editing on this version of the AFRs Input form for the parts? I already have the AFRs Input form part to not allow editing but can't figure out how to do this for the parts.


Can someone please help?


Thanks,
Bill
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:44
Joined
Aug 30, 2003
Messages
36,118
Because of this line in the current event:

Me.AFRsParts1.Form.AllowEdits = Me.cmbStatus <> "Closed"

The other tab stays read only because the textboxes are locked.
 

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
Thanks for replying.


I have 3 other versions of the AFRs form which can be edited somewhat.


I want this version (AFRs4) to not be edited at all including the subform parts just for this version.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:44
Joined
Aug 30, 2003
Messages
36,118
Then set the locked property of those textboxes as you have on the other tab. Or take out the code that conditionally sets the allow edits property.
 

bastanu

AWF VIP
Local time
Today, 03:44
Joined
Apr 13, 2010
Messages
1,401
Have a look and see if that is what you wanted.

Cheers,
Vlad
 

Attachments

  • AFR System 20.10.zip
    1.4 MB · Views: 71

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
Pbaldy,


I need to allow the edits for the subform parts on the other AFRs forms though.


Maybe there needs to be another version of the AFRsParts?


Thanks,
Bill
 

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
bastanu,


There is no parts subform on that version sorry. The parts need to be there for research but not allow to be edited.


There are 4 versions of the AFRs from the Main Form:


Administrative

Clerk
Technician
Research


The Research one is supposed to be allowed to view but not edit the details.


Thank you very much for helping
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:44
Joined
Aug 30, 2003
Messages
36,118
I need to allow the edits for the subform parts on the other AFRs forms though.

Maybe there needs to be another version of the AFRsParts?

I wouldn't have another copy of the form if I could avoid it. Change the code in the main form's current event so it doesn't unlock the subform when the status changes. I assume that's a leftover.
 

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
Pbaldy,


I commented out the code for the On Current and it works the way it should now. I was copying versions and forget to take out the code. It is hard to remember all the details.


Thanks so much for helping me.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:44
Joined
Aug 30, 2003
Messages
36,118
There are 4 versions of the AFRs from the Main Form:


Administrative

Clerk
Technician
Research


The Research one is supposed to be allowed to view but not edit the details.

What differentiates the 4 versions? I would be more likely to have a single form and handle the different needs via code. You can pass the "mode" in OpenArgs.
 

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
In order to get into the Adminstrative the password is "admin"


Clerk is "clerk"
Technician is "tech"
Research has no password.


I was having so much trouble with logins so I did it this way.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:44
Joined
Aug 30, 2003
Messages
36,118
Pbaldy,


I commented out the code for the On Current and it works the way it should now. I was copying versions and forget to take out the code. It is hard to remember all the details.


Thanks so much for helping me.

No problem. Having 4 versions of the form will be a maintenance headache. I'm lazy, I only want to make changes to one form, not four. :p
 

bastanu

AWF VIP
Local time
Today, 03:44
Joined
Apr 13, 2010
Messages
1,401
Did you look at the code in the open event of the subform on the version I;ve sent you:
Code:
Private Sub Form_Open(Cancel As Integer)
If Me.Parent.Form.Name = "AFRs4" Then
Me.AllowEdits = False
End If
End Sub

Comment out the reference to it on the OnCurrentevent of the research form and it should work the way you wanted.

Cheers,
Vlad
 

billgyrotech

Banned
Local time
Today, 05:44
Joined
Apr 18, 2013
Messages
258
I tend to agree with that for maintenance purposes but I don't possess the skills yet. Maybe one day!
 

Users who are viewing this thread

Top Bottom