Question : CF - Syntax error in Update statement

I am trying to test out a form with an Access DB.  It is giving me a syntax error.  I can't figure out what it wants.  This is the line it bombs on.

 WHERE FundNumber = #FORM.FundNumber#

Any help is appreciated.  
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

          
	UPDATE tbl_Daily_Nav
	SET Date='#FORM.Date#',
            nav_now='#FORM.nav_now#',
            nav_past='#FORM.nav_past#',
            YTD='#FORM.YTD#'
 
       WHERE FundNumber = #FORM.FundNumber#
   
	

Answer : CF - Syntax error in Update statement

what type of field is FundNumber? if it's a text field, then enclose it in quotes...

also, you should really use tag... and that may solve the data type issue for the date column, too.

assuming FundMunber is an integer field, try this:


UPDATE tbl_Daily_Nav
SET
  [Date] = ,
  nav_now = value="#arrNavNow[x]#">,
  nav_past = value="#arrNavPast[x]#">,
  YTD = value="#arrYTD[x]#">
WHERE FundNumber = value="#arrFundNumber[x]#>


Azadi
Random Solutions  
 
programming4us programming4us