Results 1 to 2 of 2
  1. #1
    virgilio is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    81

    Writing to a different table than the record souce

    I'm (still) working on a project to port our current setup in which we are using Excel as a front end via ADO to interface with Access. My project is to build an Access front end. Most of my forms are tied to single table, but there are few situations where I want to send some values to another table. These tables aren't linked in the relations page, but they could be because the FK's should match. I know that I can accomplish this with stringified SQL commands, but is there a built-in method that makes this easier?

    Paul



    I tried doing something like this:

    Code:
    Me.RecordSource = "table_2"
    Me.private_NUM = privateNUM
    Me.RecordSource = "table_1"
    but it didn't recognize the field "me.private_NUM" from table_2. Am I stuck writing SQL?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You don't need 'SQL'... Use a query.
    The query can read the value in the form and add it to the 2nd table. (Append query)

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

Similar Threads

  1. Replies: 3
    Last Post: 04-14-2019, 08:01 PM
  2. Replies: 5
    Last Post: 01-21-2018, 04:06 AM
  3. ODBC Error Writing to a new record
    By RayMilhon in forum Programming
    Replies: 10
    Last Post: 01-17-2017, 12:10 PM
  4. Writing to a record twice
    By Thompyt in forum Programming
    Replies: 6
    Last Post: 10-19-2016, 12:00 PM
  5. Replies: 2
    Last Post: 06-20-2010, 06:54 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