Hi all,
Got a couple of problems and one seems a bit odd!
First up, when constructing a string to be used with a filter, if the Field is a Integer field, or double or whatever, is the expression different? Ie.
"[Course Source] = 'Corporate'"
works fine and course source holds a text value but
"[Length of Course] = '2'"
where Length of Course is a General Number doesn't. I get asked to provide the parameter for Length of Course. I expect the answer for that is really obvious and I'm just being dumb!
The other thing is,
If [Cost Type].Value <> "Variable" Then
Where Cost Type is a combo box with two possible values Variable and Fixed(3 including null)
Does not seem to work. Even if the value of cost type isn't Variable it just does the test and doesn't notice. Can anyone see what I've missed, the full code for that bit is below.
Thanks a lot,
Pete
Private Sub RCost_Check_AfterUpdate()
If [RCost Check].Value = True Then
[Room Cost].Enabled = True
If [Cost Type].Value <> "Variable" Then
[CostType Check].Value = True
[Cost Type].Enabled = True
[Cost Type].Value = "Variable"
Call Cost_Type_AfterUpdate
End If
Else
[Room Cost].Enabled = False
[Room Cost].Value = Null
End If
End Sub
Got a couple of problems and one seems a bit odd!
First up, when constructing a string to be used with a filter, if the Field is a Integer field, or double or whatever, is the expression different? Ie.
"[Course Source] = 'Corporate'"
works fine and course source holds a text value but
"[Length of Course] = '2'"
where Length of Course is a General Number doesn't. I get asked to provide the parameter for Length of Course. I expect the answer for that is really obvious and I'm just being dumb!
The other thing is,
If [Cost Type].Value <> "Variable" Then
Where Cost Type is a combo box with two possible values Variable and Fixed(3 including null)
Does not seem to work. Even if the value of cost type isn't Variable it just does the test and doesn't notice. Can anyone see what I've missed, the full code for that bit is below.
Thanks a lot,
Pete
Private Sub RCost_Check_AfterUpdate()
If [RCost Check].Value = True Then
[Room Cost].Enabled = True
If [Cost Type].Value <> "Variable" Then
[CostType Check].Value = True
[Cost Type].Enabled = True
[Cost Type].Value = "Variable"
Call Cost_Type_AfterUpdate
End If
Else
[Room Cost].Enabled = False
[Room Cost].Value = Null
End If
End Sub