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

    Add Record

    My add record button on the tool bar at the bottom of my form has stoped working. I get a error 2447 Invalid use of . (dot) or ! operator or invalid parnethese

    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

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Code:
    If (IsEditable) Then
    seems highly dubious to me. What is 'IsEditable?' Is it a module level boolean variable or perhaps a function returning a boolean? If so the parentheses are redundant and probably causing your error.

    While commenting on your code, have a look at

    Code:
    strTmp = IIf(IsNull(Me!RequestforQuotesID), "Null", Me!RequestforQuotesID)
    The only VBA variable type that may contain a null is a variant. (Yes, I know any control on a form may be null or any column in a table may be null - but that's different.) Tthe tag 'str' suggests the receiving variable is a string. However because (I guess) you have not specified Option Explicit then VBA will default strTmp to be a variant. It's not used anyway since the appropriate line is commented out.
    Last edited by Rod; 08-14-2012 at 10:56 PM. Reason: 'sub function?' What was I talking about?

  3. #3
    Marianna_Air is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    56
    I'm so lost with this still, I've tried finding some kind of temp table that has anything to do with this but no luck

  4. #4
    Marianna_Air is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    56
    Solved this on my own, located a SN table and module

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

Similar Threads

  1. Replies: 4
    Last Post: 08-14-2012, 07:14 AM
  2. Replies: 14
    Last Post: 05-25-2012, 02:40 AM
  3. Replies: 1
    Last Post: 05-23-2012, 11:45 AM
  4. Replies: 1
    Last Post: 04-24-2012, 02:36 PM
  5. Replies: 4
    Last Post: 07-22-2011, 12:52 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