Results 1 to 12 of 12
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Conversion A97 to A2000 (Access97)

    Does somebody know where to find all the problems when converting from A97 to A2000.
    I have come across a problem when converting from A97 to A2000. It is the "RunCommand Duplicate" command.
    Can someone explain what this command does?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conversion A97 to A2000 (Access97)

    "All" the problems? That is a tall order, since it depends not only on the difference between Access 97 and Access 2000, but also on the design of your databases. Perhaps you'll findAccess 2000 for Access 97 users helpful.

    Some remarks:
    <UL><LI>I am certain you are already aware of the problems you can have with implicit DAO declarations - always declare recordsets as either DAO.Recordset or ADODB.Recordset, never as "just" Recordset.
    <LI>Access 2000 is more severe than Access 97 in determining whether a query is updatable. If a query is based on two linked tables, make sure that there is a unique key on the field on the "one" side of the link.
    <LI>You can't use @ in a MsgBox instruction any more to format the message box, unless you write a special wrapper function - search this forum for the relevant links.
    <LI>Access 2000 supports Unicode, this causes changes in the way some characters are displayed.[/list]I assume that you mean RunCommand acCmdDuplicate, for Duplicate by itself is not valid in Access VBA. This instruction will duplicate the selected control(s) on a form or report open in design view - not something I would actually use in code.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conversion A97 to A2000 (Access97)

    You might use it if you were building a wizard, I suppose.
    Charlotte

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Conversion A97 to A2000 (Access97)

    Thanks Hans, I have not checked the link yet.
    The duplicate command is in a macro, this being converted from A97. I was wondering what it does. When I try to run it in A2k I get an error.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conversion A97 to A2000 (Access97)

    If you want anyone to figure out what it's trying to do, you'll have to post the converted code, Pat.
    Charlotte

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Conversion A97 to A2000 (Access97)

    Charlotte, I converted the macro and it turns out what Hans thought it was, namely:
    RunCommand acCmdDuplicate

    Hans, would you give me a clearer explanation of what this command does.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Conversion A97 to A2000 (Access97)

    But what, if anything, was calling the macro, Pat? If it wasn't actually used, you don't need to worry about it. If it WAS used, you need to track down where. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conversion A97 to A2000 (Access97)

    Pat,

    RunCommand acCmdDuplicate is the VBA equivalent of the Edit | Duplicate menu item. This menu item is only listed in the Edit menu if you have a form or report open in design view, otherwise it is not present, and then it is only enabled if you have selected one or more controls; if you don't have any controls selected, the item will be grayed out. The action of the menu item (and hence of the instruction) is as the name indicates: it duplicates the selected controls, keeping most properties intact. (There are some exceptions, such as - obviously - Name, Top and Left. Event procedures are not duplicated.)

  9. #9
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conversion A97 to A2000 (Access97)

    Here are a few more (quite a useful site this anyway)
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  10. #10
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Conversion A97 to A2000 (Access97)

    Hi Charlotte
    The macro is being called behind a button that the user clicks, the VBA code generated by the macro is:

    Forms![EEWR FORM]![SUBFORM: PARTS PER SOURCE].Form!EEWR = Left(Forms![EEWR FORM]!EEWR, 12) & Forms![EEWR FORM]![RE-ISSUE NUMBER]
    DoCmd.RunCommand acCmdDuplicate

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conversion A97 to A2000 (Access97)

    I don't think the RunCommand instruction serves a useful purpose here. I would remove it, or comment it out, and see what happens.

  12. #12
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Conversion A97 to A2000 (Access97)

    Thanks, I will try that.

    It's just that I haven't seen that command before and certinly didn't know what it did. I'm not too sure I know now??

Posting Permissions

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