Form - Visible in Read only (1 Viewer)

sundaram

Registered User.
Local time
Today, 10:31
Joined
May 28, 2009
Messages
36
I have created a form, which is consist of "Submitteddate, Accepteddate and Respondate" Text boxes and etc.

When ever this form is opend or moves the records by pressing first, next, previous and last. The displayed in the form should be read only.


Please adivse me.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:31
Joined
Jan 20, 2009
Messages
12,852
Set the Locked property of the form to prevent records being changed.
 

sundaram

Registered User.
Local time
Today, 10:31
Joined
May 28, 2009
Messages
36
Thanks for your kind reply.

I have tried as per your reply, in Form properties "Record locks" It has options : "All Records, No Locks and Edited Record". I have selected All Records from the drop down list. But it is not working, It is not locking the data.

Please advise me I am fresher.
 

missinglinq

AWF VIP
Local time
Today, 02:31
Joined
Jun 20, 2003
Messages
6,423
If the form is always going to be read-only, the easiest way is to goto

Properties - Data

and set Recordset Type to Snapshot.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:31
Joined
Jan 20, 2009
Messages
12,852
Sorry for my misleading post above.

I was mistakenly refering to the Locked Property available on controls. This would be available on a control holding a subform but not on the main form or a subform object itself.

In the case of a Form Object the Allow Additions, Allow Deletions and Allow Edits properties could be turned off.

Otherwise, as missinglinq suggested, if you want to disable all changes, set the Recordset Type to Snapshot.
 

rommelgenlight

Registered User.
Local time
Yesterday, 23:31
Joined
Mar 23, 2009
Messages
36
you can lock or disable the field itself if your purpose only is to prevent the user from entering or editing records.
 
Last edited by a moderator:

sundaram

Registered User.
Local time
Today, 10:31
Joined
May 28, 2009
Messages
36
Mr.Galaxiom
Thanks for your correction in the reply.

My main aim is that, I want to navigate the records in form, I have locked all the bound text boxes. while navigating the records if find a record that is to be edited, that time the form should allow me to edit particular text boxes (bounded data) and not all the text boxes. For example there are 10 text boxes (data), out of that I want to edit only 3 text boxes(Data).

Is there any vb code to do so.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:31
Joined
Jan 20, 2009
Messages
12,852
Locking can be switched on or off in vb

Forms!Formname.ControlName.Locked = True/False
 

Users who are viewing this thread

Top Bottom