PC Review


Reply
Thread Tools Rate Thread

Compile error: Syntax error

 
 
Tara
Guest
Posts: n/a
 
      16th Feb 2005
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?

 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      16th Feb 2005
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?
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error - syntax error JohnLute Microsoft Access 2 12th Dec 2007 10:55 AM
Login screen compile error '3075' (syntax error) Mr.Kane Microsoft Access Form Coding 1 14th Oct 2006 02:22 AM
Compile Error and Syntax Error on Form =?Utf-8?B?R3JldGNoZW4=?= Microsoft Access Form Coding 4 19th Sep 2006 04:16 PM
Syntax and compile error. Jim15 Microsoft Excel Programming 6 27th Mar 2006 04:16 PM
Compile Error: Syntax Error?? =?Utf-8?B?QnJvb2s=?= Microsoft Access Form Coding 2 23rd Apr 2005 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:12 PM.