K
Kim
I meant the text field is calculated, not the table
field. It brings in data from the table and calculates a
number to appear on the form which is a control on the
amount they can deduct from the original value from the
table.
So, when the user hits the move next this is the
programming
DoCmd.GoToRecord , , acPrevious
txtHoursAvailable = Me.Recordset!TotalHoursComp * 1.5
The problem is when the move next reaches the last record
in the query which is blank, even though the condition
says that TotalHoursComp > 0 it shows the blank record,
and the txtHoursAvailable field does not recalculate based
on a 0 or null value, it remains the same value it was on
the last record
eg. TotalHoursComp = 8
txtHoursAvailable = 12
DoCmd.GoToRecord , , acPrevious
txtHoursAvailable = Me.Recordset!TotalHoursComp * 1.5
The fields which are txtblah = recordset!blah
are blank but txtHoursAvailable remains 12
field. It brings in data from the table and calculates a
number to appear on the form which is a control on the
amount they can deduct from the original value from the
table.
So, when the user hits the move next this is the
programming
DoCmd.GoToRecord , , acPrevious
txtHoursAvailable = Me.Recordset!TotalHoursComp * 1.5
The problem is when the move next reaches the last record
in the query which is blank, even though the condition
says that TotalHoursComp > 0 it shows the blank record,
and the txtHoursAvailable field does not recalculate based
on a 0 or null value, it remains the same value it was on
the last record
eg. TotalHoursComp = 8
txtHoursAvailable = 12
DoCmd.GoToRecord , , acPrevious
txtHoursAvailable = Me.Recordset!TotalHoursComp * 1.5
The fields which are txtblah = recordset!blah
are blank but txtHoursAvailable remains 12