Results 1 to 2 of 2
  1. #1
    abusaif is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Nov 2012
    Location
    Earth
    Posts
    39

    ComboBox ColumnCount Error

    Hi all,

    I created a Log In form which has a combo box (cboUserName) a text box (txtPassword) and a button (cmdLogIn).

    On click event I entered the below code;

    Private Sub cmdLogIn_Click()

    If Me.cboUserName.ColumnCount(2) = Me.txtPassword Then
    MsgBox "Welcome"
    End If




    End Sub


    It throws an error

    Compile Error;

    Wrong number of arguments or invalid property assignment


    where as in column count property of cboUserName is set to 3

    Appreciating your help.

  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,518
    Try


    If Me.cboUserName.Column(2) = Me.txtPassword Then
    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. Dynamic ComboBox Not in List Code Error
    By quicova in forum Programming
    Replies: 7
    Last Post: 09-19-2013, 08:10 AM
  2. Replies: 9
    Last Post: 05-11-2012, 11:18 AM
  3. Replies: 5
    Last Post: 06-10-2011, 03:31 PM
  4. Coloring a combobox as error message?!
    By Lidwina in forum Forms
    Replies: 1
    Last Post: 03-03-2011, 11:12 AM
  5. combobox.dropdown event not working after error
    By perlyman in forum Programming
    Replies: 1
    Last Post: 04-02-2010, 06:55 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