Hello
I have this small VBA code which is appending data from one table( that is selected in the list ) to other table with the same fields and name.
Private Sub Command2_Click()
Dim sVal$
sVal = Me.Combo0
sVal = "INSERT INTO OSFinal " & _
"( HDR_OPR,AID_AMC,AID_AIN,BOEV_IODBOEV_BOTM,BOEV_BOTM,BOEV_TMT,BOEV_TMD,DHRS,BOEV_BOSU,ECL, " & _
" PREV,BOEV_REP,EVCT,EVCD,BOEV_ATA,BOEV_BATA,EVT_DCT,EVT_MNT,MULTI,FILE_KEY,BOEV_OOI, " & _
" BOEV_BFOD,BOEV_BOSN,BOEV_BFRY,BOEV_MNC,BOEV_BTSH,BOEV_FLT,BOEV_REM,LNK_OEI,TASK_ID,GUARANTEE_CHARGEABILITY_INDICATOR, " & _
" CHARGEABILITY_CODE,TASK_TYPE_CODE,JIC_CODE,REPAIR_STATION_NAME,[NOTE],Num ) " & _
"SELECT HDR_OPR,AID_AMC,AID_AIN,BOEV_IODBOEV_BOTM,BOEV_BOTM,BOEV_TMT,BOEV_TMD,DHRS,BOEV_BOSU,ECL, " & _
" PREV,BOEV_REP,EVCT,EVCD,BOEV_ATA,BOEV_BATA,EVT_DCT,EVT_MNT,MULTI,FILE_KEY,BOEV_OOI, " & _
" BOEV_BFOD,BOEV_BOSN,BOEV_BFRY,BOEV_MNC,BOEV_BTSH,BOEV_FLT,BOEV_REM,LNK_OEI,TASK_ID,GUARANTEE_CHARGEABILITY_INDICATOR, " & _
" CHARGEABILITY_CODE,TASK_TYPE_CODE,JIC_CODE,REPAIR_STATION_NAME,[NOTE],Num " & _
"FROM " & sVal
CurrentDb.Execute sVal
End Sub
I have This error
I have copied each field one by one and the same name but...
Do you see any problem here?
Thank you in advance for your help
I have this small VBA code which is appending data from one table( that is selected in the list ) to other table with the same fields and name.
Private Sub Command2_Click()
Dim sVal$
sVal = Me.Combo0
sVal = "INSERT INTO OSFinal " & _
"( HDR_OPR,AID_AMC,AID_AIN,BOEV_IODBOEV_BOTM,BOEV_BOTM,BOEV_TMT,BOEV_TMD,DHRS,BOEV_BOSU,ECL, " & _
" PREV,BOEV_REP,EVCT,EVCD,BOEV_ATA,BOEV_BATA,EVT_DCT,EVT_MNT,MULTI,FILE_KEY,BOEV_OOI, " & _
" BOEV_BFOD,BOEV_BOSN,BOEV_BFRY,BOEV_MNC,BOEV_BTSH,BOEV_FLT,BOEV_REM,LNK_OEI,TASK_ID,GUARANTEE_CHARGEABILITY_INDICATOR, " & _
" CHARGEABILITY_CODE,TASK_TYPE_CODE,JIC_CODE,REPAIR_STATION_NAME,[NOTE],Num ) " & _
"SELECT HDR_OPR,AID_AMC,AID_AIN,BOEV_IODBOEV_BOTM,BOEV_BOTM,BOEV_TMT,BOEV_TMD,DHRS,BOEV_BOSU,ECL, " & _
" PREV,BOEV_REP,EVCT,EVCD,BOEV_ATA,BOEV_BATA,EVT_DCT,EVT_MNT,MULTI,FILE_KEY,BOEV_OOI, " & _
" BOEV_BFOD,BOEV_BOSN,BOEV_BFRY,BOEV_MNC,BOEV_BTSH,BOEV_FLT,BOEV_REM,LNK_OEI,TASK_ID,GUARANTEE_CHARGEABILITY_INDICATOR, " & _
" CHARGEABILITY_CODE,TASK_TYPE_CODE,JIC_CODE,REPAIR_STATION_NAME,[NOTE],Num " & _
"FROM " & sVal
CurrentDb.Execute sVal
End Sub
I have This error
I have copied each field one by one and the same name but...
Do you see any problem here?
Thank you in advance for your help