"Less Than" Query Problem

  • Thread starter Thread starter JTF
  • Start date Start date
J

JTF

I have a form that contains a drop down list, from which the user can
select a "period" - from 1-13.

I have two update queries that I need to run based on what period the
user selects. In the first query, a field called Current Balance is
updated with the RevAmount field for the particular NCASperiod
selected. SQL code is below.

UPDATE NCAS SET NCAS.CurrentBalance = NCAS.RevAmount
WHERE (((NCAS.Period)=Forms![ComboBox for Report]!NCASPeriod));

This query works as it should.

The next query is basically the same. It should update a field called
PreviousBalance with the REVAMOUNT field, if the PERIOD field is less
than the NCASperiod selected from the drop down list.

UPDATE NCAS SET NCAS.PreviousBalance = NCAS.RevAmount
WHERE (((NCAS.Period)<[Forms]![ComboBox for Report]![NCASPeriod]));

This query does not work at all. It continually asks me to type the
desired period.

Can someone tell me what I am missing here? I've looked at the SQL
over and over and am not seeing it.

many thanks!
 
Back
Top