Results 1 to 3 of 3
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    Ambiguous name detected (Isloaded)

    Hello everyone. I seem to have put myself in a bind. I amcreating a recipe book DB that is password protected. I am using, (Security Levels 2012b) by Liam Sullivan and arecipe book called (recipes2k). I do not know the creator of the recipe book.The problem I am having is when I click Multiply in the recipe book I amgetting an [Ambiguous name detected (Isloaded)].

    If Not IsLoaded("Multiply Dialog") Then
    Exit Sub
    End If

    It appears that this (Isloaded)is used in the code of both the Security Levels 2012b and the recipes2k. I haveresearched this and have not come with a way to fix the problem that I canunderstand. If I have too make changes I would like to make the change to therecipe book code and not the security code. I have included the code from recipe book that itsays is creating the problem. I have also attached a copy of the data bass. I am using Access 2016 32bit. Thanks for your help.



    Code:
    Private Sub Multiply_Click()
        Dim rst As Recordset
        Dim dblFactor As Double
        On Error GoTo Multiply_Err
        DoCmd.OpenForm "Multiply Dialog", , , , , acDialog
        
        If Not IsLoaded("Multiply Dialog") Then
            Exit Sub
        End If
        If IsNull(Forms![Multiply Dialog]![Factor]) Or Forms![Multiply Dialog]![Factor] = 0 Then
            DoCmd.Close acForm, "Multiply Dialog"
            Exit Sub
        End If
        DoCmd.Hourglass True
        dblFactor = CDbl(Forms![Multiply Dialog]![Factor])
        Set rst = Me![Recipes Subform].Form.RecordsetClone
        rst.MoveFirst
        While (Not (rst.EOF))
            rst.Edit
            rst![Quantity] = rst![Quantity] * dblFactor
            rst.Update
            rst.MoveNext
        Wend
        Me.SetFocus
        Me![NumberofServings] = Forms![RECIPES]![NumberofServings] * dblFactor
        rst.Close
    Multiply_Exit:
        DoCmd.Close acForm, "Multiply Dialog"
        DoCmd.Hourglass False
        Exit Sub
    Multiply_Err:
        MsgBox Err.Description
        Resume Multiply_Exit
    End Sub





    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    You have two public IsLoaded user defined functions in general modules. Access doesn't know which one to run. Remove one of them.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    Thank-you for that information. It worked. I removed the from the recipe code but then the multiply button would no longer work, so I'm had to remove it from security code and both is now working fine. Thank-you

    Code:
    If Not IsLoaded("Multiply Dialog") Then
            Exit Sub
        End If

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

Similar Threads

  1. Compile Error: ambiguous name detected
    By bronson_mech in forum Programming
    Replies: 2
    Last Post: 01-19-2017, 07:31 AM
  2. Replies: 3
    Last Post: 04-23-2016, 10:43 PM
  3. Replies: 11
    Last Post: 06-04-2014, 10:58 AM
  4. isloaded not refreshing every time
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 03-05-2014, 09:42 PM
  5. Replies: 2
    Last Post: 06-23-2012, 11:59 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