David R
I know a few things...
- Local time
- Today, 16:58
- Joined
- Oct 23, 2001
- Messages
- 2,632
On my (Continuous Form) subform I have the following code in OnCurrent:
Private Sub Form_Current()
If (Me.DeviceName = "Car Club") Then
Me.LicPlate.Visible = -1
Me.LicPlate.Enabled = -1
Me.VehYear.Visible = -1
Me.VehYear.Enabled = -1
Me.VehModel.Visible = -1
Me.VehModel.Enabled = -1
Else
Me.LicPlate.Visible = 0
Me.LicPlate.Enabled = 0
Me.VehYear.Visible = 0
Me.VehYear.Enabled = 0
Me.VehModel.Visible = 0
Me.VehModel.Enabled = 0
End If
End Sub
However this code makes ALL of the devices change depending on which line has the focus, i.e. if a Car Club has the focus, every entry has the boxes (blank of course for non-car clubs). If a Security Bar has the focus, the extra boxes are invisible for ALL entries.
As you can probably tell, I would like the extra boxes (Dlookup boxes, actually) to only be active on those lines of the continuous subform which are car clubs. Both types are usually present on any particular Main Form entry.
Any suggestions what I am doing wrong?
TIA
David R
Private Sub Form_Current()
If (Me.DeviceName = "Car Club") Then
Me.LicPlate.Visible = -1
Me.LicPlate.Enabled = -1
Me.VehYear.Visible = -1
Me.VehYear.Enabled = -1
Me.VehModel.Visible = -1
Me.VehModel.Enabled = -1
Else
Me.LicPlate.Visible = 0
Me.LicPlate.Enabled = 0
Me.VehYear.Visible = 0
Me.VehYear.Enabled = 0
Me.VehModel.Visible = 0
Me.VehModel.Enabled = 0
End If
End Sub
However this code makes ALL of the devices change depending on which line has the focus, i.e. if a Car Club has the focus, every entry has the boxes (blank of course for non-car clubs). If a Security Bar has the focus, the extra boxes are invisible for ALL entries.
As you can probably tell, I would like the extra boxes (Dlookup boxes, actually) to only be active on those lines of the continuous subform which are car clubs. Both types are usually present on any particular Main Form entry.
Any suggestions what I am doing wrong?
TIA
David R