L
ljr
I am trying to insert a record into a table using sql. One of my fields
"PicLocation" is multi-valued. I have tried just the field in my sql as
shown below. I have also tried with the multi fields and keep getting the
same error message. Any know what I am doing wrong? Thanks in advance.
The error is: Run-time error '3824'
An INSERT INTO query cannot contain a multi-valued
field.
strSQL = ("INSERT INTO tbl_Login ( UserID, PicLocation, Privilege) " & _
"SELECT tbl_Employees.[UserID], tbl_Employees.PicLocation, " & _
"tbl_Employees.Privilege " & _
"FROM tbl_Employees " & _
"WHERE (tbl_Employees.UserID)=" & "'" & me.txtWinUser & "'" & ";")
I have also tried the following with the same error.
strSQL = ("INSERT INTO tbl_Login ( UserID, PicLocation,
PicLocation.FileData, " & _
"PicLocation.FileName, PicLocation.FileType, Privilege ) " & _
"SELECT tbl_Employees.[User ID], tbl_Employees.PicLocation, " & _
"tbl_Employees.PicLocation.FileData, " & _
"tbl_Employees.PicLocation.FileName, " & _
"tbl_Employees.PicLocation.FileType, tbl_Employees.Privilege " & _
"FROM tbl_Employees " & _
"WHERE (tbl_Employees.[User ID])=" & "'" & Me.txtWintUser & "'" & ";")
"PicLocation" is multi-valued. I have tried just the field in my sql as
shown below. I have also tried with the multi fields and keep getting the
same error message. Any know what I am doing wrong? Thanks in advance.
The error is: Run-time error '3824'
An INSERT INTO query cannot contain a multi-valued
field.
strSQL = ("INSERT INTO tbl_Login ( UserID, PicLocation, Privilege) " & _
"SELECT tbl_Employees.[UserID], tbl_Employees.PicLocation, " & _
"tbl_Employees.Privilege " & _
"FROM tbl_Employees " & _
"WHERE (tbl_Employees.UserID)=" & "'" & me.txtWinUser & "'" & ";")
I have also tried the following with the same error.
strSQL = ("INSERT INTO tbl_Login ( UserID, PicLocation,
PicLocation.FileData, " & _
"PicLocation.FileName, PicLocation.FileType, Privilege ) " & _
"SELECT tbl_Employees.[User ID], tbl_Employees.PicLocation, " & _
"tbl_Employees.PicLocation.FileData, " & _
"tbl_Employees.PicLocation.FileName, " & _
"tbl_Employees.PicLocation.FileType, tbl_Employees.Privilege " & _
"FROM tbl_Employees " & _
"WHERE (tbl_Employees.[User ID])=" & "'" & Me.txtWintUser & "'" & ";")