Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:49:00+00:00 2026-06-11T00:49:00+00:00

Using SQL in Access, trying to Update a table, with the user name, from

  • 0

Using SQL in Access, trying to “Update” a table, with the user name, from another table.
The 3rd line below (SQLnm2…) says error-2465 cant find field ‘|’.
I’ve tried changing the expression many ways but no success.
Any assistance would be greatly appreciated.

Dim SQLnm As String  
Dim SQLnm2 As String  
SQLnm2 = SQLnm2 & "', '" & [Employees]![NBK] & "');"  
SQLnm = " Update tbl_DateTracking SET NBK = "  
SQLnm = SQLnm & "'" & SQLnm2 & "' WHERE "  
SQLnm = SQLnm & "CaseId = '" & CaseId & "' AND OCC_Scenario = '" & OCC_Scenario & "';"  
DoCmd.RunSQL SQLnm 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:49:02+00:00Added an answer on June 11, 2026 at 12:49 am

    You have a close bracket where it is not opened on your third line.

    SQLnm2 = SQLnm2 & “‘, ‘” & [Employees]![name] & “‘);”

    You are also not stating which column to update. It appears you want to update 2 columns, the first being NBK with an empty value. The second is tricky as you either want to update your column called Name or update another column to the value of employee.name.

    Your code concatenates to

    Update tbl_DateTracking
    SET NBK = ”, ‘Employee name’ WHERE

    Your code needs to state what column is the Employee Name.

    EG

    Update tbl_DateTracking
    SET NBK = ”, EnterColumnNameHere= ‘Employee.Name’ WHERE

    or maybe you meant

    Update tbl_DateTracking
    SET NBK = ‘Employee.Name’ WHERE

    Until I know how many columns you’re trying to populate (and with what value), I can’t provide SQL code.

    As a guide for context:

    UPDATE table_name
    SET column1=value, column2=value2,...
    WHERE some_column=some_value
    
    UPDATE Persons
    SET Address='Nissestien 67', City='Sandnes'
    WHERE LastName='Tjessem' AND FirstName='Jakob'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to update an old Access database using SQL scripts, but I can't
I am trying to insert records into Access table from SQL Server table. For
Need to query my SQL server from Access using an ADO connection (for example),
I am using a function to import data from a access db into SQL
I am trying to load data from database (either MS Access or SQL server)
I’m trying to access the SQL Server instance on my VPS from SQL Server
I'm trying to access a large Oracle database through SQL Server using OPENROWSET in
Using Oracle SQL Developer I'm trying to access a given package that has been
I'm using Linq to SQL to access my database. I want to have a
I'm using SQL Server 2008 with Hibernate 3.0 at data access layer of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.