Results 1 to 3 of 3
  1. #1
    Marianna_Air is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    56

    Run Time Error 2447

    I'm getting a run time error 2447 Invalid use of . (dot) or ! operator or invalid parnethese. When I attempt to debug it highlights the below code

    Private Sub Form_Current()

    strTmp = IIf(IsNull(Me!RequestforQuotesID), "Null", Me!RequestforQuotesID)
    Location.Requery
    DoCmd.Maximize
    'PrepareITtmpForSubform (strTmp)

    If (IsEditable) Then
    Me.AllowEdits = True
    Me.Request_For_Quotes_Subform.Locked = False
    Else
    Me.AllowEdits = False
    Me.Request_For_Quotes_Subform.Locked = True


    End If
    End Sub

    Thank you
    V/R Kevin

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    IIF is 'immediate if' (more on IIF here, i prefer to use if, then else in vb, more on if,then,else here), try this instead

    Code:
    Private Sub Form_Current()
         If IsNull(Me!RequestforQuotesID) then
        strTmp =  "Null" 
    'note this will not make it null, but instead allocated the string 'null'
    'also note no further action is required so i did not write in elseif or else
    endif
    Location.Requery
        DoCmd.Maximize
        'PrepareITtmpForSubform (strTmp)
        
        If (IsEditable) Then
          Me.AllowEdits = True
          Me.Request_For_Quotes_Subform.Locked = False
        Else
          Me.AllowEdits = False
          Me.Request_For_Quotes_Subform.Locked = True
        End If
    End Sub

  3. #3
    Marianna_Air is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    56
    Thank you, that fixed it

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

Similar Threads

  1. Replies: 4
    Last Post: 07-25-2012, 04:01 AM
  2. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  3. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  4. Replies: 5
    Last Post: 03-27-2012, 01:40 PM
  5. Replies: 2
    Last Post: 12-23-2010, 09:11 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