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

form locks and subforms

Status
Not open for further replies.

newbieone

Technical User
Jan 3, 2006
50
US
Have a form that has controls to lock the form and unlock the form for editing records. however, the list box on this form needs to be unlocked at all times and searchable. If I put this list box on a subform tied to the main form will this keep it from being locked when the CMD button is clicked? Also using this code for the list box, Private Sub Combo105_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo105], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

What would need to change in order for this to work on the subform?

If anyone has any other ideas on how to do this quicker, better faster, please feel free to comment.
 
Why not just code only those fields you want locked intead of locking the entire form?
 
How would I go about coding only the fields I want to lock? I would assume that I could put all of this under control of a Cmd button.
 
On you command button, something like:

Me.FieldName1.Locked = True
Me.FieldName2.Locked = True
etc...
etc...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top