Results 1 to 8 of 8
  1. #1
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46

    Do OS make a difference ?

    I was on Windows XP and upgraded to Windows 7. Some of my screens do not seem to work now. For example, I have a search screen (continuous form) with a button named btnView. When I click on it, it should pass the id and bring up another form with the detail information for that id. It worked in XP but not it does not do anything in 7. When I click on the button, it just sits there, no errors, nothing.

    This is the code for the event procedure for the button.

    Private Sub btnView_Click()


    DoCmd.OpenForm "Review Shipment Request Form", acNormal, , "ID = " & Me.ID
    End Sub

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Have you been able to put a break point on that docmd statement to determine what is actually going on with the "ID = " & Me.ID . . .?
    I worked a contract a few years ago where I started out in Access 2007 - XP . . . and then they switched the OS to Win 7 . . . and then they changed the Access version to 2008.
    I did run into a few issues [not like what you've outlined above] . . . so I can confirm that there are issues when switching to Win 7.

    It always bothers me when something that worked fine in one version - doesn't work when you 'upgrade' !!

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Another thing to check is that the database is in a trusted location, or code won't run at all. The code you posted should work fine on a Win 7 machine.

    Robeen, Access 2008?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46
    Quote Originally Posted by Robeen View Post
    Have you been able to put a break point on that docmd statement to determine what is actually going on with the "ID = " & Me.ID . . .?
    I worked a contract a few years ago where I started out in Access 2007 - XP . . . and then they switched the OS to Win 7 . . . and then they changed the Access version to 2008.
    I did run into a few issues [not like what you've outlined above] . . . so I can confirm that there are issues when switching to Win 7.

    It always bothers me when something that worked fine in one version - doesn't work when you 'upgrade' !!
    How do I put in a break point (what is that) ? Clicking on the button does not do anything. I made the ID visible so I can see what is being passed and it is the correct id. But the funny thing is that when I open the report manually, the information is there. I just want the report to open when I click on the button, not when I do it manually.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    For break points and debugging info
    see http://www.cpearson.com/excel/debug.htm

    Chip deals specifically with Excel but most of the info is applicable to Access.

  6. #6
    The VBA Man is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    7
    you should check the button-to-code connection... sometimes that gets broken when you do certain things to the button in design mode... open the form in design mode, click on "btnView", press F4 to bring up the property sheet, and go to the "Event" tab. Under the "On Click" entry, make sure it (still) says "[Event Procedure]"

  7. #7
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Try this:
    Add a new button to your Form [Cancel the Command Button Wizard].
    With the button selected - go to Property Sheet - Event - and then Click the [...] to the right of the On Click event & select Code Builder.
    Put this line of code in there:
    DoCmd.OpenForm "Review Shipment Request Form", acNormal, , "ID = " & Me.ID
    Run the Form & click the new button & see if the new button works.

    Let us know what happens.

  8. #8
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46
    Quote Originally Posted by Robeen View Post
    Try this:
    Add a new button to your Form [Cancel the Command Button Wizard].
    With the button selected - go to Property Sheet - Event - and then Click the [...] to the right of the On Click event & select Code Builder.
    Put this line of code in there:
    DoCmd.OpenForm "Review Shipment Request Form", acNormal, , "ID = " & Me.ID
    Run the Form & click the new button & see if the new button works.

    Let us know what happens.

    I tried that and it did not work, kept getting error about not being able to parse, so I don't know if I did something wrong or typed something incorrectly. However, I did find something out and now it almost works. There is a Securty Warning at the top of the form, saying content has been disabled. I click and then enable (the macros) and now it works. I went to trust center to enable the macros and that seem to do it. But there is another minor problem and I will create a new post.

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

Similar Threads

  1. Get difference of Min and Max
    By nazimscr in forum Queries
    Replies: 1
    Last Post: 07-14-2012, 02:04 PM
  2. Difference Algorithms
    By dandoescode in forum Programming
    Replies: 6
    Last Post: 05-18-2012, 10:29 AM
  3. Mark the difference
    By zhshqzyc in forum Access
    Replies: 1
    Last Post: 01-28-2011, 08:49 AM
  4. difference between drivers
    By tomc1 in forum Access
    Replies: 0
    Last Post: 08-04-2009, 10:41 AM
  5. Time difference
    By jguidry in forum Programming
    Replies: 1
    Last Post: 11-15-2008, 12:41 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