Results 1 to 5 of 5
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Error in Performing Data Entry with SQL

    I am working in the tutorial whose link is now shown:

    http://www.functionx.com/access/Lesson31.htm


    now when I try the section performing data entry with SQL, I am
    at the point where I have typed the SQL statement:

    INSERT INTO Employees(EmployeeNumber, [Last Name], Gender, HourlySalary)


    VALUES ('227947','Jameson','M',18.85);

    It chokes on the "unknown variable" HourlySalary, I could find nothing wrong with it.
    I then deleted my HourlySalary and copied theirs directly from the tutorial. It still chokes on HourlySalary.

    Now I am not sure what to do since I have taken their script and copied it to the SQL window.

    What is wrong here?

    Any help appreciated. Thanks in advance.

    Respectfully,


    Lou Reed

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    I see nothing wrong with the statement. HourlySalary is actually a field in the table? It is Double or Decimal number field type?

    Odd that this tutorial sometimes uses spaces in field names. I guess that is deliberate to demonstrate the differences in using fields with and without spaces. In a real db it would be desirable to not use spaces.
    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.

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I believe that it is money. I cannot be sure however. It is hourly salary.

    R,

    Lou Reed

  4. #4
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    I was able to create the Table as described and insert the Record without any problems. Based on your error, it looks like the Table doesn't have a Column named HourlySalary. I would try to confirm that the Column exists and the spelling is correct.

    If everything looks correct, can you provide a screenshot of the design View of your Table or a copy of the DB for us to look at?

  5. #5
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I will try.

    Thanks for your help.

    R,

    Lou Reed

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

Similar Threads

  1. Replies: 9
    Last Post: 08-09-2015, 02:11 PM
  2. Replies: 7
    Last Post: 03-05-2015, 07:34 AM
  3. Unbound text boxes show #ERROR on data entry line
    By GraeagleBill in forum Forms
    Replies: 4
    Last Post: 01-07-2015, 12:44 AM
  4. Replies: 5
    Last Post: 03-09-2014, 07:16 PM
  5. Error Message re: data entry of date
    By Pro-not in forum Access
    Replies: 9
    Last Post: 10-22-2010, 10:14 AM

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