Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Runtime error 3075? (https://www.askmehelpdesk.com/showthread.php?t=621054)

  • Dec 20, 2011, 04:56 AM
    martinakl
    Runtime error 3075?
    Hi. I have an SQL code using in VBA Access. There is still some syntax error and cannot see it. I would really appreciate, if anyone has any idea. Thanks. Here is is.
    Set rst = Application.CurrentDb.OpenRecordset("SELECT DISTINCT da_MF_DATA_complete.*, com.[comment] As comment FROM da_MF_DATA_complete " _
    & " LEFT JOIN (SELECT mf_id, max([date]) As last_date FROM dbo_mf_comment WHERE status_id = 'RLC' AND dbo_mf_comment.origin = 'ACN' GROUP BY dbo_mf_comment.[mf_id]) " _
    & " As last_comment ON last_comment.[mf_id] = da_MF_DATA_complete.[mf_id] " _
    & " LEFT JOIN dbo_mf_comment As com ON last_comment.[mf_id] = com.[mf_id] AND last_comment.[last_date] = com.[date] " _
    & " WHERE current_mf_status_id = 'RLC' AND mf_complete IS NULL ORDER BY return_priority DESC;")

  • All times are GMT -7. The time now is 06:18 PM.