3075 Syntax Error Missing
Contents |
Operator) in query expression If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that syntax error missing operator in query expression you want to visit from the selection below. Results 1 to 9 of 9 Thread: Run syntax error missing semicolon mysql Time Error'3075': Syntax Error(Missing Operator) in query expression Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid syntax error missing operator in query expression datetime Mode Switch to Threaded Mode May 11th, 2009,10:50 AM #1 mcleyn View Profile View Forum Posts Thread Starter Junior Member Join Date May 2009 Posts 28 Run Time Error'3075': Syntax Error(Missing Operator) in query expression I am running a syntax error missing before * database using MS Access 2000 along with Visual Basic. Inside the database I am running a specific tracking summary form that takes information from a populated main table. Inside the tracking summary form I have three combo boxes; Status, Fiscal Year and Province, with their respective choices. When a user chooses one of the choices within the combo boxes it gives a Run-Time Error'3075': Sytnax error (missing operator) in query expression 'tblmain.Status comment tblMain.ProjectTitle'. More Information About the Error: When
Syntax Error Missing Operand After 's' Operator
I debug the error it highlights the line of code: Me.RecordSource = sql I have declared the variables and there is no other errors with the other code only the highlighted line. There are also other lines of code stated under the highlighted line of code, they are not highlighted but may or may not be part of the problem, I am unsure of this. Me.RecordSource = sql -(highlighted code) Me.cboStatus = statusTemp -(not highlighted) Me.cboFiscalYear = fiscalYearTemp -(not highlighted) Me.cboProvince = provinceTemp -(not highlighted) I am not sure what to do with this error. What do you think the problem is and how do you think I can fix this? Reply With Quote May 11th, 2009,11:00 AM #2 KTech View Profile View Forum Posts Visit Homepage Lively Member Join Date Jun 2008 Location Pittsburgh Posts 117 Re: Run Time Error'3075': Syntax Error(Missing Operator) in query expression It says the error is in the sql expression which would indicate the sql variable contains the error. can you print the value before the line executes using "debug.print sql" Then you can see the value of sql and you should see an error in that. You can also take the sql statement that is produced and copy it into a new query window and try executing it there. It should highlight exactly where the problem is. Reply With Quote May 11th, 2009,12:40 PM #3 mcleyn View Profile View Forum Pos
Top Posters Today's Posts Search Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts
Syntax Error Missing Operator In Query Expression Access
Tag Search Advanced Search Find All Thanked Posts Go to Page... syntax error missing before statement Thread Tools Rating: Display Modes 10-11-2013, 10:29 AM #1 manusri Newly Registered User Join syntax error missing operand after '12' operator Date: Dec 2012 Posts: 29 Thanks: 11 Thanked 0 Times in 0 Posts Run time error '3075': Syntax error (missing operator) in query expression Hi all , I am http://www.vbforums.com/showthread.php?568912-Run-Time-Error-3075-Syntax-Error(Missing-Operator)-in-query-expression struggling with a set of VBA coding that a previous person on the project was using. I am fixing their mess and i cannot for nuts figure out why the error comes up. So let me describe what i am trying here. There is a parent table with basic information about each vendor. I have linked the parent table http://www.access-programmers.co.uk/forums/showthread.php?t=254940 with a bunch of other tables including the one that stores contacts for each vendor. There is a main form that has the contacts in a subform. The subform has a list box that has to list the name and role of each person for that vendor. This is my code Code: ' Adding new vendor Private Sub AddCont_Click() Me.author.Value = "" Me.AuthorRole.Value = "" Me.RoleOth.Value = "" Me.Condition.Value = "" Me.othrcondition.Value = "" Me.CmbTest.Value = "" Me.email.Value = "" Me.phone.Value = "" Me.Fax.Value = "" Me.fix.Value = "" Me.chkCurrent.Value = "False" Me.txtAction.Value = "NewRecord" End Sub 'Save command button on Subform Private Sub Command5_Click() Dim db As Database Set db = CurrentDb Dim rs As DAO.Recordset Dim SQLStr As String Dim SQLstr2 As String On Error GoTo HandleError If Me.txtAction.Value = "NewRecord" Then Set rs = CurrentDb.OpenRecordset("Contacts") With rs .AddNew ![siteid] = Me.Parent!NewSiteID.Value ![Name] = Me.author.Value ![Role] = Me.AuthorRole.Value ![ORole] = Me.RoleOth.Value ![Speciality] = Me.Condition.Value ![SpecialityOther] = Me.othrcondition.Value ![Test] = Me.CmbTest.Value ![email] = Me.email.Value ![phone] = Me.phone.Value ![Fax] = Me.Fax.Value ![Suffix] = Me.fix.Value ![IsCur
+ Ask a Question Need help? https://bytes.com/topic/access/answers/931145-run-time-error-3075-syntax-error-missing-operator-query-expression Post your question and get tips & solutions from a community of 418,417 IT Pros & Developers. It's quick & easy. Run-time error 3075 Syntax error (missing operator) in query expression P: 26 3c4j5d I am having difficulty in adding an additional table to a syntax error SQL statement. Basically, I want to add that the INSERT should take place if not found in this additional table. I will attach a file showing the query as it is running successfully now, and then how I am trying to modify it for the additional syntax error missing table and selection criteria where I am receiving the 3075 error. Any help will be greatly appreciated!! Attached Files Error3075addingMSAUDIT_REMOVED_USER_LOG.txt (2.8 KB, 128 views) Jan 30 '12 #1 Post Reply Share this Question 7 Replies Expert Mod 10K+ P: 12,110 Rabbit Please copy and paste the code into the post and surround it in code tags. Jan 30 '12 #2 reply P: 26 3c4j5d Expand|Select|Wrap|Line Numbers InsertSQL="INSERTINTOTEMP_DIRECT_RPTS(MGR_LAN_ID,COWORKER_LAN_ID,COWORKER_LAST_NAME,COWORKER_FIRST_NAME,"_ &"DATE_INSERTED,USERACCOUNTCONTROL,EMAIL,COMPANY,DEPARTMENT,ACCOUNT_ACTIVE,LOCATION,CITY,STATE,"_ &"TITLE,EMP_STATUS)"_ &"SELECTDIRECT_RPTS.MGR_LAN_ID,DIRECT_RPTS.COWORKER_LAN_ID,DIRECT_RPTS.COWORKER_LAST_NAME,"_ &"DIRECT_RPTS.COWORKER_FIRST_NAME,DIRECT_RPTS.DATE_INSERTED,DIRECT_RPTS.USERACCOUNTCONTROL,"_ &"DIRECT_RPTS.EMAIL,DIRECT_RPTS.COMPANY,DIRECT_RPTS.DEPARTMENT,DIRECT_RPTS.ACCOUNT_ACTIVE,"_ &"DIRECT_RPTS.LOCATION,DIRECT_RPTS.CITY,DIRECT_RPTS.STATE,DIRECT_RPTS.TITLE,VP_MAAR_EMP.EMP_STATUS"_ &"FROM(DIRECT_RPTSLEFTJOINdbo_VergenceUsernameMapONDIRECT_RPTS.COWORKER_LAN_ID=dbo_VergenceUsernameMap.ID)"_ &"INNERJOINMSAUDIT_REMOVED_USER_LOGONDIRECT_RPTS.COWORKER_LAN_ID=MSAUDIT_REMOVED_USER_LOG.R_LAN_ID"_ &"LEFTJOINVP_MAAR_EMPONdbo_VergenceUsernameMap.EmployeeNo=VP_MAAR_EMP.EMPLOYEE"_ &"WHERE(((DIRECT_RPTS.MGR_LAN_ID)='"&User&"')AND((VP_MAAR_EMP.EMP_STATUS)NotIn('TF','TP','SN')))"_ &"ANDDIRECT_RPTS.COWORKER_LAN_IDNOTIN(SELECTR_LAN_IDFROMMSAUDIT_REMOVED_USER_LOG)" Jan 30 '12 #3 reply Expert Mod 10K+ P: 12,110 Rabbit So that's the code that works right? Show us the code that doesn't work. Jan 30 '12 #4 reply P: 26 3c4j5d No, sorry.....here is the code that works. What I entered above produces the 3075 error. Expand|Select|Wrap|Line Numbers InsertSQL="INSERTINTOTEMP_DIRECT_RPTS(MGR_LAN_ID,COWORKER_LAN_ID,COWORKER_LAST_NAME,COWORKER_FIRST_NAME,"_ &"DATE_INSERTED,USERACCOUNTCONTROL,EMAIL,COMPANY,DEPARTMENT,ACCOUNT_ACTIVE,LOCATION,CITY,STATE,"_ &"TITLE,EMP_STATUS)"_ &"SELECTDIRECT_RPTS.MGR_LAN_ID,DIRECT_RPTS.COWORKER_LAN_ID,DIRECT_RPTS.COWORKER_LAST_NAME,"_ &"DIRECT_RPTS.COWORKER_FIRST_NAME,DIR