Results 1 to 2 of 2
  1. #1
    UserX is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jun 2014
    Posts
    30

    Run-Time 3075: Syntax error

    I could use some help here. The code looks right to me, but then again, I'm a noob.


    Code:
    CurrentDb.Execute "UPDATE tblDMS SET CLIN='" & Me.cboCLIN & "' WHERE [Mission ID]=" & Me.lstMissions.Column(0)
    When I click on the button, Command21, I get the following error message:

    Run-Time 3075: Syntax error (missing operator) in query expression '[Mission ID]='.

    I originally had the field in the table as MissionID, but for S&G I tried with space; problem still exists.

    It's probably something simple that I've overlooked (or just don't know enough about), but I can't seem to figure out what the problem with the field is.

    I've attached a sample db. The problem happens on 'frmLRC'. Since the table that the listbox points to has only a few records, select or type in 10/26/2014 into the Mission Date field.

    What I'm trying to accomplish is to allow an update to the CLIN field on the table by entering the number into the Account Number field on the form, and then clicking on the command21 button.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    The # character is a delimiter for date values. Remove them.

    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-10-2014, 11:30 AM
  2. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  3. Replies: 3
    Last Post: 03-05-2013, 11:17 AM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Replies: 5
    Last Post: 03-27-2012, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums