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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read-only form?

Status
Not open for further replies.

thefourthwall

IS-IT--Management
Feb 26, 2002
387
0
0
US
I have a form for checking existing users' cell phone information, with 2 combo boxes used to search for either
a cell number or last name.

I want the fields (name/info/cell#, etc.) to be locked, and unlocked only after a record is selected from the combo box, or a command button has been clicked.

So I thought that code in the After Update event of the combo boxes like
Code:
Me.UserLName.Locked = True
for all the fields would work, with an "Edit" command button to unlock the fields.

Much of this is new to me, and want to know if there is a better way.

thanks
 
Looks ok. The "Me." is superfluous in this context. You might want to provide some visual feedback to indicate when things are locked/editable, for this reason you might consider using .enabled instead of .locked.

 
I wonder if this will work?

lockout(true)

public sub lockout(state as boolean)

with NameOfForm
.name.enable = state
.info.enable = state
.cell.enable = state
end with
end sub

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top