Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Compile error: Syntax error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tara - 16 Feb 2005 15:05 GMT
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?
Alex Dybenko - 16 Feb 2005 20:08 GMT
this line looks strange:
IIf ([IFSP Number]=0,1,[IFSP Number]+1)

i think should be something on the left side

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

>I have a form that has a combo box from which
> users choose a family number.  After this is done, the
[quoted text clipped - 34 lines]
> previously entered IFSP's, just can't add any new ones.
> Any ideas as to what's going on?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.