Detail section as read-only or disable "Add new record" (1 Viewer)

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
hi guys,

how do i make my forms Detail - read only, and leave the header as normal? you see, i have a combo box which filters the form in the header section, but if i open the whole form in read only view, the combo doesn't work what results no filter for me :mad:

or alternatively, how do i remove that "create new record" at the bottom of the form, where there's just a blank space for the new record, and then i will disable all of the fields, so that the form acts as: read only.. ?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:12
Joined
Aug 30, 2003
Messages
36,133
You can change the form's Allow Additions property.
 

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
so where do i put:

Code:
.AllowAdditions = False


cuz im a little confused.. how do i make it work? =/
 

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
and when i put it to No in form properties under Data, the blank record still appears, ready to be filled in =/

i have this problem on my continuous form, where the whole list is presented to the user. I need to visually get rid of this stupid row.. any ideas how?
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 20:12
Joined
Jan 20, 2009
Messages
12,856
AllowAdditions - No really should stop the new record line appearing. Maybe you have a corrupted form. Try using the clipboard to Copy the controls and code to a new form.

Another approach is to put the data you want locked into a subform and set the subformcontrol to Locked.
 

vbaInet

AWF VIP
Local time
Today, 11:12
Joined
Jan 22, 2010
Messages
26,374
I wonder how cos is setting it to No. Are you doing it in code or did you actually set it manually in the Property Sheet?
 

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
in property sheet.. cuz access chose not to accept it as code.. and the dam thing still not working.. i gues i'll just make the whole thing read only and disable all of the fields that i need, and create an edit button with a form to it..

thanks for all your help guys!
 

vbaInet

AWF VIP
Local time
Today, 11:12
Joined
Jan 22, 2010
Messages
26,374
Perhaps you can upload your db so we can take a look.

But did you try both suggestions from Galaxiom?
 

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
yep.. i just locked everything and made an edit btn...
 

vbaInet

AWF VIP
Local time
Today, 11:12
Joined
Jan 22, 2010
Messages
26,374
Good!

We will still be interested in a cut-down version of your db just so we can see what went wrong or what was done wrong.
 

cos

Registered User.
Local time
Today, 11:12
Joined
Jul 13, 2012
Messages
81
Event: On Current:
Form.AllowAdditions = False

worked best!! cheers guys!
 

Users who are viewing this thread

Top Bottom