Results 1 to 6 of 6
  1. #1
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370

    Question There is an invalid use of the . (dot) or ! operator or invalid parntheses.

    Hello all,



    I'm encountering this run-time error 2447, "There is an invalid use of the . (dot) or ! operator or invalid parenthese."

    Here is part of my code:

    Private Sub Form_Current()
    Select Case Me.cboStaffName
    Case "1"
    MM1.Visible = True
    MM2.Visible = False
    MM3.Visible = False
    MM4.Visible = False
    MM5.Visible = False
    MM6.Visible = False
    MM7.Visible = False
    MM8.Visible = False
    MM9.Visible = False

    The error is being thrown at the second line, "Select Case Me.cboStaffName"

    Any help would be nice.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    What is the Bound Column for cboStaffName? What data type is that field?

  3. #3
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    The first column is bound, the datatype is long integer, and also, cboStaffName is pulling its values from another combobox on another form. so basically the value of cboStaffName is =[Forms]![OtherForm]![OthercboBox]

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Maybe the solution is to pass an integer to the Select Case statement.

    Case 1

    'Do this

    End Select

  5. #5
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    Ah I actually figured out the problem, I actually added a "closewindow" action on the [OtherForm] that was getting the value for cboStaffName, so basically the value of [OthercboBox] was dissapearing after closing the form, thus giving me the error. Its working now, thank you for your suggestion though!

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Sometimes it helps to talk through the problem.

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

Similar Threads

  1. invalid argument
    By ck4794 in forum Programming
    Replies: 18
    Last Post: 11-04-2013, 07:52 AM
  2. Invalid Relational Operator Error
    By KelleyM in forum Queries
    Replies: 5
    Last Post: 11-08-2012, 10:53 AM
  3. Replies: 7
    Last Post: 08-28-2011, 02:07 PM
  4. Invalid use of me
    By kman42 in forum Access
    Replies: 1
    Last Post: 04-28-2011, 12:40 PM
  5. Invalid use of Null
    By Wayne311 in forum Programming
    Replies: 4
    Last Post: 01-27-2011, 05:10 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