• VBeditor bug? (access 2000 sr-1)

    Author
    Topic
    #364279

    I converted a db from Access 97 to 2000 and now can’t seem to get my VBeditor working right. When I set breakpoints and then “run”, the “Macro…” window pops up. When I try to “step into”, nothing happens. I can’t seem to find anything in this forum that relates to this problem. I haven’t tried reloading Access 2000 yet. Anyone have any ideas?

    Viewing 2 reply threads
    Author
    Replies
    • #558695

      You’re setting breakpoints in VBA code but you’re getting a … what? A dialog? I don’t know what the “Macro …” window might be, unless it’s the dialog you see when a macro breaks, and that has nothing to do with the VB editor.

      How are you setting the breakpoints if the VB editor isn’t working? In Access 2000, it isn’t always possible to break into code at points that allowed it in 97, but you haven’t really explained what *is* happening.

      • #558806

        Sorry, guess me explaination was kinda vague.

        The dialog box that pops up is the same as under Tools>Macros… I’m going to reload Access and hope this takes care of the problem.

        • #558815

          Tools–>Macros gives you a submenu that lists the VBE and Macros. Are you saying that when you select the VBE, it doesn’t open or that you get the Run Macro dialog instead? I never bother with the menu for that and you can’t run code routines from the menu anyhow, so what behavior are you expecting that isn’t happening?

        • #558842

          Hi Lisa,
          If you’re getting the Macros dialog appearing, I would guess you’re trying to run some code that expects an argument? I think Access gets a little confused as you haven’t given it any way of passing the argument to it, so it assumes you’re trying to run something else, hence the macro dialog with all your subs that don’t require arguments.
          Hope that helps.

          • #558853

            Thanks for your input. All as my code is doing is opening a form and going to the last record (to add). It’s in the “on click” sub of a form button.

            Help specifies: Run Sub/UserForm or Run Macro — Runs the current procedure if the cursor is in a procedure, runs the UserForm if a UserForm is currently active, OR RUNS A MACRO IF NEITHER THE CODE WINDOW NOR A USERFORM IS ACTIVE. (emphasis added)

            …But my userform IS active and/or the cursor IS in the procedure.

            I’ve reinstalled A2K and still having the same problem. I am not new to Access, but have just upgraded to Access 2000.

    • #558845

      Lisa: This problem happened to me just yesterday. What I had to do was set the breakpoint as normal, then exit the VBE and return to my form and run the code (from a button click) and all worked well. HTH.

      • #558854

        I’ll bite… How do you change the breakpoint to “normal” ??? What am I missing? (other than a few million brain cells). hairout

        • #558855

          My post read, set the breakpoint as normal, or as you would normally set a breakpoint, i.e., in VBE, Debug, Toggle breakpoint. Exit from VBE and click your button. Your code should stop at the breakpoint. Sorry I was a little vague. HTH.

    • #559169

      I believe that Access 2000 will only let you run a procedure in a *Module* in this manner. I get the same thing as you describe if I click in an event procedure (such as btnOK_Click): the Macros dialog pops up. I believe you will get the same dialog box even if you don’t have any breakpoints set. I believe you will have to actually open the form in form view and click the button to run the Click event procedure. That is what I always have done.

      Another thing, from what I have seen a UserForm is different than an Access Form. In Help for the VBA Editor it says you can click Insert–>UserForm. But I don’t see that menu there.. confused I had a UserForm open once in the Editor but I don’t recall how I got it there. I do remember that it looked more like the beginning of a Visual Basic form than an Access form. Hope this 2 cents helps.

      • #559177

        Greg, I do believe you are right. It just seemed so much easier in Access 97. sigh Thanks for your reply. smile

        • #559254

          Access does not use the same forms that the rest of Office and VB use. However, this has been true all along and isn’t an artifact of Access 2000. The biggest change is in the VB IDE, which is very different in 2000 and looks and feels more like the IDE in VB and in the rest of Office. Once you get used to it, you may find you like it better–I know I did.

    Viewing 2 reply threads
    Reply To: VBeditor bug? (access 2000 sr-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: