Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form for display only

Status
Not open for further replies.

Uaikega

Programmer
Aug 7, 2002
8
AU
My application requires a form purely for displaying a record - not to be editable, since most users have only "reference access" to the database, and need not (in fact must not) edit records.

I have a form which works precisely as I want it - in "properties" all the "edit" functions are set to "off" and it can't be edited - however if you click on a field it will still be highlighted (highlit?) and the form tends to jump about in the window, so that I need to keep the scroll bars there for readjusting it so it can be read.

Is there a way that I can turn off user interaction with a form altogether, except for the ability to scroll though records?
 
As well as the form level properties that you are currently using to prevent editing of existing records, you could also use the control level Enabled and Locked properties to prevent access to the controls.

For example, if you set a controls Enabled property to False and Locked property to True, the display wont be effected, but the control will not be able to get the focus.

This sort of thing can be done programatically; for example using the form's OnOpen event. Let us know if you need more info on this approach.

Hope this helps,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Thanks for that, Steve - was fiddling with the properties and got there by myself about the time you posted your answer. I have set Enabled off and Locked on for each field and sub-form in the form involved - and now have the form I originally wanted - pure display and no input.

Still very appreciative for your interest in helping me - at least it confirms that I am on the right track. No - we won't worry about doing it in VB, at this stage at least - I'd prefer to save VB code as a last resort when I can't get whatever I want to do to work any other way!

I am an old Clipper hack trying to learn Access, and finding it an uphill battle.
 
Yes, I come from a Clipper, Foxpro, DBase background as well. If it helps, Access is a fantastic tool, when you get to know it.

The reason you might want to consider using VBA code to do what you want, is that it allows you to dynamically reconfigure the form, for example, depending on who the user is; eg. an administrator can have full access; a manager can only read the screens, because you've disabled the controls programatically.

Good luck,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top