P
PaleRider
Hi,
I keep getting a "Too few parameters. Expected 1." error when I try to
insert a value into a field in table Main. What I want to do is insert the
value of lngCount into a field named DaysRemaining but only if the value in
field named IsExpired is equal to -1. Can someone figure out how to fix the
sql string so Access will be happy. Thanks in advance...
Here's my code:
dim lngCount as Long
dim strSql as String
lngCount = DateDiff("d", Date(), Me.txtExpiredDate)
strSql = "UPDATE Main SET Main.DaysRemaining = lngCount " & "WHERE
(((Main.IsExpired) = true));"
CurrentDb.Execute strSql
I keep getting a "Too few parameters. Expected 1." error when I try to
insert a value into a field in table Main. What I want to do is insert the
value of lngCount into a field named DaysRemaining but only if the value in
field named IsExpired is equal to -1. Can someone figure out how to fix the
sql string so Access will be happy. Thanks in advance...
Here's my code:
dim lngCount as Long
dim strSql as String
lngCount = DateDiff("d", Date(), Me.txtExpiredDate)
strSql = "UPDATE Main SET Main.DaysRemaining = lngCount " & "WHERE
(((Main.IsExpired) = true));"
CurrentDb.Execute strSql