Lister
Z Shift
- Local time
- Today, 13:56
- Joined
- Aug 24, 2003
- Messages
- 305
Right got another for you all.
This time I am trying to use an option group in a subform.
If the user selects [On_Going] I would like the date/time field [dtmBYWHEN] to be disabled.
And, conversely, if the [Limited Time] option is selected, [dtmBYEWHEN] will be enabled.
To be honest visable = True/False would be fine.
The small field at the bottom hold the value stored by the option group. [intOnGoing_Date]
At the moment it doesn’t seem to matter which is selected. All the records in this sub form are either Enabled or Disabled, depending on my code.
Anyway my code for this subform is…
Now I am using a continuous form. Is this my problem?
If it is, is there any way around this proble?
Thanks guys
This time I am trying to use an option group in a subform.
If the user selects [On_Going] I would like the date/time field [dtmBYWHEN] to be disabled.
And, conversely, if the [Limited Time] option is selected, [dtmBYEWHEN] will be enabled.
To be honest visable = True/False would be fine.
The small field at the bottom hold the value stored by the option group. [intOnGoing_Date]
At the moment it doesn’t seem to matter which is selected. All the records in this sub form are either Enabled or Disabled, depending on my code.
Anyway my code for this subform is…
Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_ErrorHandler
Dim intHoldNum As Integer
intHoldNum = Me.intOnGoing_Date
If intHoldNum = 1 Then
Me.dtmBYWHEN.Enabled = False
Else
Me.dtmBYWHEN.Enabled = True
End If
Exit_ErrorHandler:
Exit Sub
Err_ErrorHandler:
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
Resume Exit_ErrorHandler
End Sub
Now I am using a continuous form. Is this my problem?
If it is, is there any way around this proble?
Thanks guys
Attachments
Last edited: