Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   Run-Time Error '3075' Syntax Error (https://www.askmehelpdesk.com/showthread.php?t=639984)

  • Feb 29, 2012, 03:13 PM
    Mromley
    Run-Time Error '3075' Syntax Error
    I am getting a missing operator error when I try to run this line of code:

    If DCount("*", "Sample Info", "[REPORTNUM] = " & DLookup("[REPORTNUM]", "Specimen")) = 0 Then
    ' trying to recover test deleted from db only
    Beep
    MsgBox "Database sample information for the selected test has been deleted from the database; results cannot be displayed.", vbInformation, "Unrecoverable Test Results"
    Call KillFile("TESTED.TXT")
    Exit Function


    The program was running fine a few days ago and now it is giving me this error. Any help would be appreciated
  • Mar 2, 2012, 07:08 AM
    Mromley
    Problem was resolved, what had happen is in the middle of doing a test for which this program had been written a system crash occurred. When the line of code runs it looks for the last report to generate from that and since the report was not there it caused an error. By deleting the last report the code ran fine and continued working.

  • All times are GMT -7. The time now is 02:47 PM.