My SQL (using parameter method 'cause the text in ljobQual can be more than 255 characters) doesn't work with Select Max(Job_Code_ID):

redim strSQL(1)
strSQL(0) = "INSERT INTO JOB_QUALF_TBL " _
& "(JOB_CODE_ID, JOB_QUALF) " _
& "(SELECT MAX(JOB_CODE_ID) " _
& " FROM DB2O.DB2DBA.JOB_CODE, ?)"
strSQL(1) = ljobQual

It work when Select Max(Job_Code_ID) is not used:

redim strSQL(1)
strSQL(0)="INSERT INTO DB2O.DB2DBA.JOB_QUALF " _
& "(JOB_CODE_ID, JOB_QUALF) " _
& "VALUES " _
& "(" & lJobCodeSuperId & ", ?)"
strSQL(1) = ljobQual

Would you please show me how to fix this when Select Max(Job_Code_ID) is used. Thank you very much for your help.