setting 'tag' properties to locked fo every record

  • Thread starter faapa via AccessMonster.com
  • Start date
F

faapa via AccessMonster.com

Hi there

Can anyone help - i have a form with all properties = locked. When a button
(btn_edit) is clicked, a section of properties (tag = filter_two) are
unlocked and edits can be made. however, when i pass through records, i am
still able to edit records, having only pressed the edit button once on a
previous record. does anyone know how to set properties (filter_two) to
locked everytime a user passes a record?

here's the code i've used:

Private Sub Cmd_edit_Click()

' Declare local variables
Dim ctl As Control

' Loop through each control on the form and change where Tag = "FILTER"
For Each ctl In Me.Controls
With ctl
If .Properties("Tag").Value = "FILTER" Then
Let .Properties("Locked") = False
End If
End With
Next ctl

' De-initialise
Set ctl = Nothing

End Sub
 
A

Al Campagna

Faapa,
Use the OnCurrent event of the form to always set the Locked to yes. The button will
allow you to edit that one record, but when you move to another, the Locked will be
applied again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top