Syntax for allow edits and addittions (1 Viewer)

NNothard

Registered User.
Local time
Today, 17:20
Joined
Jun 7, 2006
Messages
18
Hi just a quick question

Could someone please help me with the correct syntax for changing the allow edits and additions property on a form in code.

I have a form which is locked for these things but I want to allow some users the ability to open the form in edit mode in order to add new entries.

Thanks in advance.

Nic
 

bigstav

Registered User.
Local time
Today, 17:20
Joined
Jul 6, 2006
Messages
20
Open Form in Edit / Read-Only

There are several ways, please see 2 possibilities below :-

Button on Form code :-

Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False

Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True




To Open from another Form :-

DoCmd.OpenForm "Form1", , , , acFormReadOnly
DoCmd.OpenForm "Form1", , , , acFormEdit


Hope this gets you going in the right direction.
 

NNothard

Registered User.
Local time
Today, 17:20
Joined
Jun 7, 2006
Messages
18
Yes, thank-you
 

simonblanco

New member
Local time
Today, 18:20
Joined
Jan 20, 2010
Messages
2
Hi to everyone, it's my first post here. I am interested in a similar button. I worked with VBA on excel, but here in access i am finding more problems...

Could you define more precisely where i should write that code and/or link it to the button? And i i want to use a checkbox?

Thanks in advance!​
 

simonblanco

New member
Local time
Today, 18:20
Joined
Jan 20, 2010
Messages
2
Hi to everyone, it's my first post here. I am interested in a similar button. I worked with VBA on excel, but here in access i am finding more problems...

Could you define more precisely where i should write that code and/or link it to the button? And if i want to use a checkbox?

Thanks in advance!​
 

Users who are viewing this thread

Top Bottom