Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ambiguous name error message (2000)

    Hello

    I am getting an "Ambiguous name error message".
    Any suggestions as to the cause?

    see attachment.

    Justin.

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    jj

    This error could mean a duplicate name within the code or a repeated procedure.
    Check your code for this.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Having rectified this fault , the code does not to appear to work.
    Any ideas?

    see attachment.


    Justin.

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Justin

    The answer is in your attachment.

    cmdExportReport

    You have this name twice !!

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    I have renamed this , but the code still appears to have no effect.
    Any ideas?

    see attachment.
    Justin.

  6. #6
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Justin

    You have renamed Click to Click1 which is the propery event behind the button.
    cmdExportReport is the duplicate, which is the name of the command button.

    Which event do you want fired from the button ?

  7. #7
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    The "On Click" event.

    Justin.

  8. #8
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Justin

    If you have a button on your form called "cmdExportReport", if you check the properties for this control, you should have in the "Event" Tab, [Event Procedure] in the "On Click" line.
    If you hi-lite it and click the icon to the right with 3 dots [...] , this should open the VBE editor to the routine which is called when you click the button.
    Your attachment shows two routines, which the first one will fire.

    Private Sub cmdExportReport_Click()
    Dim strReportName As String
    .....................

    Private Sub cmdExportReport_Click1()
    ExportPDF ........................


    Which of these do you want fired, the first one or the second one.

    If you can be a little more explanitory on what is happening, I can probably help.

  9. #9
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    I would like to run both procedures.
    i.e automatically create PDF reports.

    Nothing appears to happen when the command button.

    Justin.

  10. #10
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    OK we're getting somewhere now.

    I assume ExportPDF is a module function or something, can you paste the code to a TXT and attach it (Make sure its under 100kb) and I'll reproduce it here.

    I'll post my results back.

  11. #11
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Requested code.

    Justin.

  12. #12
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Justin
    The code I need is "ExportPDF" not the events behind the button.
    Somewhere in your dataase is a routine with this name.
    It will probably look like:

    <pre> Public Sub ExportPDF ( Doc As String) </pre>

    or something

  13. #13
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    I don't have a procedure by this name.
    If you go to this thread , this is the coding l have used.

    http://www.wopr.com/cgi-bin/w3t/showthread...l?Number=322094

    Justin.

  14. #14
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Ok Justin
    I'll have a look and come back to you, later.

  15. #15
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ambiguous name error message (2000)

    Many thanks for that.

    Justin

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •