Results 1 to 5 of 5
  1. #1
    premis is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    33

    error using combo box on form

    I have a combo box on my form that I use to search my records. We use it to select a client and have that client show up on the form. For some reason, the original combo box we had stopped working, so I tried to put another on using the wizard and deleted the original that had stopped working.



    Now when I try to use the combo box I get an error. The drop down shows my clients and it allows me to start typing their name and have it show up, but when I select a name I get the error "procedure declaration does not match description of event or procedure having the same name" When I select "OK" on that message box an "action failed" box pops up with the following.

    Macro Name : Client Details : cboGoToContact : AfterUpdate : Embedded Macro
    Condition: True
    Action Name: SearchForRecord
    Arguments: -1, , First, ="[Contact Name] = " & "'" & [Screen].[ActiveControl] & "'"
    Error Number: 2950

    I did a search for error 2950 and nothing that helped came up. I have enabled macros and selected to trust the source.

    Anyone have any ideas?

    Thanks,
    Brad

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Did you properly rename the new combobox?

    I don't use macros, only VBA.

    Try troubleshooting tips from http://support.microsoft.com/kb/89610
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post
    Did you properly rename the new combobox?
    I'm wondering if the problem is that the OP named the new Combobox the same as the old Combobox and if this has confused the Access Gnomes! Like most of us here, I never use Embedded Macros, and have no idea what Access does with them when the associated Control is deleted, but this sort of sounds like the error message you'd get if you have two Form_Load events in a single Form.

    Linq ;0)>

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    That's true, deleting the control won't delete its procedures from the form module. With VBA code Debug>Compile will reveal presence of two same-name procedures in same module, generating 'ambiguous name' error.
    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.

  5. #5
    premis is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    33
    Well, I'm not sure what happened, but it works now. I didn't do anything, maybe it just needed a restart.

    Thanks for all the replies!

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

Similar Threads

  1. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  2. Combo Box FK Data Type Error
    By southcraven in forum Database Design
    Replies: 7
    Last Post: 02-02-2012, 09:42 PM
  3. Combo Box Error Stops Function
    By Phred in forum Forms
    Replies: 3
    Last Post: 01-28-2012, 02:21 PM
  4. Error with filtering subform using 2 combo boxes
    By dharmacloud in forum Forms
    Replies: 4
    Last Post: 08-22-2011, 10:46 AM
  5. Replies: 5
    Last Post: 01-02-2011, 10:09 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