+ Reply to Thread
Results 1 to 2 of 2

Access 2007 Compile error in User login form VBA

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Access 2007 Compile error in User login form VBA

    Hi All,

    I am creating a user form in Access 2007. I am receiving a Compile Error within my VBA coding. Please take a look at the code below and see if you can help.

    Compile Error: Expected: End of statment

    Recived on line:
    Please Login or Register  to view this content.
    Within the VBA code:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Access 2007 Compile error in User login form VBA

    odd # quotes, it should be:

    “[UserID] = '” & Me.cboUser & "'"

    don't forget the single quotes inside the dbl.
    user is a string and must be surrounded by quotes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. user form login
    By cwhite1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2016, 03:38 AM
  2. Access Login Form User Levels
    By Clayhead22 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2015, 09:12 PM
  3. Access Login Form User Levels
    By Clayhead22 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2015, 07:51 PM
  4. [SOLVED] User Login Form using VBA
    By sn152 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2014, 11:51 AM
  5. User form compile error - Need urgent help
    By Avinash1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2013, 09:04 AM
  6. compile error - Using text box to display date in an user form
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 04:02 AM
  7. User/Login code with different access levels
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2011, 05:36 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1