Results 1 to 3 of 3
  1. #1
    gunitinug is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2017
    Posts
    23

    onclick openform macro causes syntax error

    Click image for larger version. 

Name:	syntax error on click.PNG 
Views:	9 
Size:	22.7 KB 
ID:	30066

    if i click on the left side of existing record it opens a dialog as expected.
    But if I clikck on the left side of record not yet created (eg. 3rd row) I get this error message in the pic.



    I think I need to modify the onclick openform macro to handle errors. Preferably it will be simple as silently ignoring the error?

    THX

  2. #2
    gunitinug is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2017
    Posts
    23
    the onclick macro is:
    Code:
    OpenForm
       Form Name floater_test
        View           Form
       Filter Name
       Where Condition =="[groupID]=" &[groupID]
       Data Mode   Edit 
       Window Mode   Dialog

  3. #3
    gunitinug is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2017
    Posts
    23
    FIXED add if clause before opening form

    Code:
    if not isnull([groupID]) then   
       openform ....

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Macro If statement syntax error
    By euphonium01 in forum Macros
    Replies: 5
    Last Post: 10-15-2013, 07:30 AM
  2. Web Database: OpenForm Macro to Specific Record
    By besuchanko in forum Macros
    Replies: 3
    Last Post: 07-25-2013, 12:17 PM
  3. Question: SigmaPlot macro syntax error
    By Captain Database ...!! in forum Import/Export Data
    Replies: 2
    Last Post: 03-27-2012, 10:04 AM
  4. DoCmd.OpenForm Syntax Error
    By alsoto in forum Forms
    Replies: 3
    Last Post: 02-29-2012, 01:14 PM
  5. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums