Frame causing trouble

arage

Registered User.
Local time
Today, 20:43
Joined
Dec 30, 2000
Messages
537
Frame causing trouble
I have an option group frame on my form that disables certain controls based on the frame value. When I hit a certain record though, the locks are applied, but then as you scroll thru the records either way, the same lock applies to all the records, locks that were not there a moment ago.
 
well I think I figured it out, the disabling procedure is this:

For Each ctl In Me.pagePromoPreApproval.Controls
If ctl.tag = "tagDealer" Or ctl.tag = "tagVu" Then
ctl.Enabled = False
End If
Next ctl

I’m assuming the Controls collection represents the controls as a whole, and not as they apply to a certain record. How could I modify above so that the disabling only occurs upon the current records control, not the controls as they apply to the entire recordset.
 
I noticed that you are checking the tag fields for certain values and then protecting the fields. Am I correct in assuming that the Tag fields are being reset each time you change from record to record. If yes, the following code should do the trick:

For Each ctl In Me.pagePromoPreApproval.Controls
If ctl.tag = "tagDealer" Or ctl.tag = "tagVu" Then
ctl.Enabled = False
Else
ctl.Enabled = True
End If
Next ctl

HTH
SteveA
 
no Steve, I’m not resetting the tags at all, they were meant to simply help identify a group of controls is all.
 
How do you know which records should have these fields protected and which shouldn't?

Cheers,
SteveA
 

Users who are viewing this thread

Back
Top Bottom