Results 1 to 4 of 4
  1. #1
    Mohamed is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2011
    Posts
    17

    Compile Error Syntax Error

    Hi
    Wonder if anyone can help
    I get an syntax error when compiling the code below.
    Any help will be much apprediated.
    Thanks



    Private Sub Command105_Click()
    If IsNull(Me!Encryption_Password) Then
    Me!Encryption Password = DMin("[Encryption_Password]", "QueryEncryption", "[Encryption_ID]=" & Me!Encryption_Password)
    Debug.Print DMin("[Encryption Password]", "QueryEncryption")

    Debug.Print LaptopID, Me!Encryption_Password

    End If
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    On what line? For starters, it seems odd to test that a field is null and then turn around and try to use the null field as a criteria. This line should be:

    Debug.Print LaptopID & ", " & Me!Encryption_Password
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Mohamed is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2011
    Posts
    17
    Thank you for your reply and help

    The line on which the error is on is

    Me!Encryption Password = DMin("[Encrpytion_Password]", "QueryEncryption", "[Encrpytion_ID]=" & Me!Encrpytion_Password)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The inadvisable space in the name would require it to be bracketed.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 09-28-2011, 09:20 PM
  2. Compile Error - Ambiguous Name ???
    By jacek.w.bak in forum Reports
    Replies: 1
    Last Post: 07-07-2011, 09:25 AM
  3. Compile error. Sub of function not defined
    By plavookins in forum Reports
    Replies: 7
    Last Post: 04-22-2011, 10:15 AM
  4. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM
  5. compile error
    By darklite in forum Access
    Replies: 6
    Last Post: 08-31-2010, 04:27 PM

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