Results 1 to 3 of 3
  1. #1
    uronmapu is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2012

    Error message: Compile Error Ambiguous name detected: varTitle

    Could you help me fix the Error message:

    Compile Error Ambiguous name detected: varTitle

    Private Sub Save_Click()
    Me.lngEmpID.Value = lngMyEmpID
    MsgBox ("Saved"), , "Saved Contact"
        varTitle = Forms!NewContact!Title
        Call CallFunction
    If MsgBox("Do you want to create new contact ?", vbYesNo, "Do you want to create new contact ?") = vbYes Then
     DoCmd.Close acForm, Me.Name
        DoCmd.OpenForm "NewContact"
     DoCmd.Close acForm, Me.Name
        DoCmd.OpenForm "S"
        End If
        'DoCmd.Close acForm, Me.Name
        'DoCmd.OpenForm "S"
    End Sub

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Ottawa, ON (area)
    It's hard to know, since you didn't show us much -

    It's only a guess - but do you have a variable named varTitle and a control on the form named that as well? Try searching the form code module for all occurances of the string varTitle to see how you have used it.


  3. #3
    help_me_with_access is offline help_me_with_excel
    Windows XP Access 2007
    Join Date
    Jun 2012
    ummm...more than likely this is it:

    Call CallFunction
    CALL and FUNCTION are both keywords, more than likely.

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

Similar Threads

  1. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  2. Compile Error Syntax Error
    By Mohamed in forum Access
    Replies: 3
    Last Post: 10-06-2011, 10:12 AM
  3. Replies: 6
    Last Post: 09-28-2011, 09:20 PM
  4. Compile Error - Ambiguous Name ???
    By jacek.w.bak in forum Reports
    Replies: 1
    Last Post: 07-07-2011, 09:25 AM
  5. Ambiguous Outer Join Error
    By scruiks in forum Queries
    Replies: 3
    Last Post: 07-18-2010, 05:06 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
Tech Forums: Microsoft Office Forums