this line looks strange:
IIf ([IFSP Number]=0,1,[IFSP Number]+1)
i think should be something on the left side
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Tara" <(E-Mail Removed)> wrote in message
news:070101c51438$ea0027d0$(E-Mail Removed)...
>I have a form that has a combo box from which
> users choose a family number. After this is done, the
> choice they make limits the value in a text box called
> Total IFSP's (this displays the total number of IFSP's
> for that particular family). From there, a user can
> enter an IFSP number into a third text box and then
> view/edit that IFSP. There is also a comand button that
> gives the user the option of adding a brand new IFSP for
> that family. This all worked fine until recently, but
> now when the user goes to add a new IFSP we are getting
> an error message that says: Complie error: Syntax
> Error. The code I have behind the Add IFSP command
> button is:
>
> Private Sub Command3_Click()
> On Error GoTo Err_Command3_Click
>
> Dim stDocName As String
> Dim stLinkCriteria As String
>
> stDocName = "IFSP"
> DoCmd.OpenForm stDocName, , , stLinkCriteria,
> acFormAdd, , Me.Family_Number
> IIf ([IFSP Number]=0,1,[IFSP Number]+1)
>
> Exit_Command3_Click:
> Exit Sub
>
> Err_Command3_Click:
> MsgBox Err.Description
> Resume Exit_Command3_Click
>
> End Sub
>
> I get this error whether the family has had any previous
> IFSP's or not. The user can still View/Edit any
> previously entered IFSP's, just can't add any new ones.
> Any ideas as to what's going on?
>