G
Guest
Good morning,
Using WinXP and Access2002.
I should be able to do this; perhaps my brain is on vacation.
On a form, bound control [intFreq], I enter a number, i.e. 14.070
Same form, in another bound control [intBand], I need to calculate/determine
what was in the first control and programmatically enter a value in the
second control. Both controls are 'number fields', general number format.
In the Afterupdate event of the first control, I have this:
If me.intFreq <= 1.8 and >= 2 Then
me.intBand = 160
Elseif: me.intFreq <= 3.500 and >= 4 Then
me.intBand = 80
Elseif: me.intFreq <=7 and >= 7.3 Then
me.intBand = 40
Else:
End If
The compile error I get is "Syntax error". I checked the Help in Access and
did a search on If…Then…Else statements in the discussion group and did not
find a related topic. I also checked VBA Help, but I was unable to determine
the meaning of "Block If" well enough to help me.
Using WinXP and Access2002.
I should be able to do this; perhaps my brain is on vacation.
On a form, bound control [intFreq], I enter a number, i.e. 14.070
Same form, in another bound control [intBand], I need to calculate/determine
what was in the first control and programmatically enter a value in the
second control. Both controls are 'number fields', general number format.
In the Afterupdate event of the first control, I have this:
If me.intFreq <= 1.8 and >= 2 Then
me.intBand = 160
Elseif: me.intFreq <= 3.500 and >= 4 Then
me.intBand = 80
Elseif: me.intFreq <=7 and >= 7.3 Then
me.intBand = 40
Else:
End If
The compile error I get is "Syntax error". I checked the Help in Access and
did a search on If…Then…Else statements in the discussion group and did not
find a related topic. I also checked VBA Help, but I was unable to determine
the meaning of "Block If" well enough to help me.