Hi. On Sat, Feb 16, 2002 at 01:46:34PM -0000, [EMAIL PROTECTED] wrote: > Hi, > [...] > All is fine except for one query which contains a sub select so therefore > will not work. [...]
How to handle missing sub-selects is explained here: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html > CurrentDb.Execute "DELETE * FROM KeywordsForPicture WHERE > (KeywordsForPicture.PicID=" & Forms!frmPhotographs!textPicID & ") AND > (KeywordsForPicture.KeywordID IN (SELECT KeywordID FROM Keywords WHERE > Keywords.SubCatID=" & cboSubCategory & "))" In this case, this gives (don't know about VB, so keep an eye on that parts...): CurrentDb.Execute "DELETE * " & "FROM KeywordsForPicture AS kfp, Keywords AS k" & "WHERE kfp.PicID = " & Forms!frmPhotographs!textPicID & " " & "AND kfp.KeywordID = k.KeywordID " & "AND k.SubCatID = " & cboSubCategory I presume that VB takes case of proper escaping of user input values. If not, you need to use the equivalent of mysql_real_escape_string() of the C API. > While I'm here are there any other tweaks people would suggest while using > the Access Front end? The Access front end is a semi temporary arrangement, > next personal challenge is to create a php driven front end. Sorry, cannot help with that. Bye, Benjamin. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php