문제

I am trying to update a single table with data from an Access form and a value from another table. For example:

strSQL = "INSERT INTO table_name (col1, col2) SELECT '" & Me.txtBox1.Value & "'," & tableName2.ID"

I have never worked with Access forms prior to yesterday. Any help is appreciated.

도움이 되었습니까?

해결책

Try something with a SELECT FROM statement, e.g.:

INSERT INTO
    table1
(
    col1,
    col2,
)
SELECT
    txtBox1.value,
    table2.col1
FROM
    table2

Obviously format the SQL to however you are coding the statement.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top