S
silva
I use command button navigation to perform certain tasks as I move from
record to record in a form. Somehow I get an error that only shows up for
unpopulated records (only the primary key has data and there's no associated
data in the subform). The error:
Microsoft Office Access can't find the field '|' referred to in your
expression.
This occurs for all five navigation command buttons (First, Last, Previous,
Next records and Close Form). The code added to each button is as follows:
[Balance] = [record_sum]
If [record_sum] <= 0 Then
[Fee_Box] = 0
ElseIf [Radio_Button_A] = True And [record_sum] <= 400 And [record_sum]
ElseIf [Radio_Button_A] = True And [record_sum] > 400 Then
[Fee_Box] = Round([record_sum] * 0.1, 2)
ElseIf [Radio_Button_B] = True And [record_sum] > 0 Then
[Fee_Box] = Round(40, 2)
End If
The code determines a late fee based on the balance (10%) if radio button A
is selected with a balance greater than $400.00, $40.00 if radio button A is
selected and the balance is between $400.00 and $0.00, $40.00 if radio button
B is selected and the balance is greater than $0.00, or $0.00 if the balance
is $0.00 or there is a credit on the balance.
The remaining code attached to each button is default code inserted by
Access relevant to the button. I think the problem may be related to the
[record_sum] field being empty, but I'm not sure.
Any clue as to why it gives an error with an unpopulated record would be
appreciated.
record to record in a form. Somehow I get an error that only shows up for
unpopulated records (only the primary key has data and there's no associated
data in the subform). The error:
Microsoft Office Access can't find the field '|' referred to in your
expression.
This occurs for all five navigation command buttons (First, Last, Previous,
Next records and Close Form). The code added to each button is as follows:
[Balance] = [record_sum]
If [record_sum] <= 0 Then
[Fee_Box] = 0
ElseIf [Radio_Button_A] = True And [record_sum] <= 400 And [record_sum]
[Fee_Box] = Round(40, 2)0 Then
ElseIf [Radio_Button_A] = True And [record_sum] > 400 Then
[Fee_Box] = Round([record_sum] * 0.1, 2)
ElseIf [Radio_Button_B] = True And [record_sum] > 0 Then
[Fee_Box] = Round(40, 2)
End If
The code determines a late fee based on the balance (10%) if radio button A
is selected with a balance greater than $400.00, $40.00 if radio button A is
selected and the balance is between $400.00 and $0.00, $40.00 if radio button
B is selected and the balance is greater than $0.00, or $0.00 if the balance
is $0.00 or there is a credit on the balance.
The remaining code attached to each button is default code inserted by
Access relevant to the button. I think the problem may be related to the
[record_sum] field being empty, but I'm not sure.
Any clue as to why it gives an error with an unpopulated record would be
appreciated.