Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Bill Casanova is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2011
    Posts
    13
    Hi Orange

    This looks fine, but why does it work for you with Access 2003 and not for me with Access 2007?

    I have posted an Access 2007 version to pbaldy asking him to see if it works for him. If it does then there must be something wrong with the way my Access 2007 is set up.

    I sometime wish I never changed from Windows XP to Windows 7. I have had no end of trouble with it!

  2. #17
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Well I'm running XP on my own machine from an admin account. So that may be why it's working for me.
    I'm sure Paul will get it straightened out on 2007.

  3. #18
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I only have 2000 on the machine I'm on now. It likely worked for orange because (s)he either enabled code or put it in a trusted location. You need to go where I told you and add

    C:/User/Bill/My documents

    as a trusted location. Alternatively, if there's a bar below the ribbon that says "Options", click on that and enable code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    Bill Casanova is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2011
    Posts
    13
    Quote Originally Posted by pbaldy View Post
    I only have 2000 on the machine I'm on now. It likely worked for orange because (s)he either enabled code or put it in a trusted location. You need to go where I told you and add

    C:/User/Bill/My documents

    as a trusted location. Alternatively, if there's a bar below the ribbon that says "Options", click on that and enable code.
    Hurray! It worked.
    This bussines with a trusted location was new to me.
    There is allways something new to learn.
    THANK YOU!

  5. #20
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I told you Paul would have the answer.

    Your posts prove ... with Access perseverance is key to solving a problem.

  6. #21
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Glad we got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #22
    Bill Casanova is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2011
    Posts
    13

    One problem solved, more coming up.

    I got my original db saved in a trusted place.
    Attached are two versons of it, one in Access 2002 -3 and the other in Access 2007.

    I open the form "Skj Hvilket rom?" (Frm Which room?) and select a room from the ComboBox, then press the button "Forhåndsvis rapport" (Preview report) and expect to get a report showing all books in that room, but all I get is an empty report, no room is selected!

    The button has the following code attached to it:

    Private Sub Kommando9_Click()
    On Error GoTo Err_Kommando9_Click
    Dim stDocName As String
    stDocName = "Rpt Bøkene i Rom? - sortert på Forfatter og Tittel"
    DoCmd.OpenReport stDocName, acPreview, , "Rom = '" & Me.Kombinasjonsboks7 & "'"
    Exit_Kommando9_Click:
    Exit Sub
    Err_Kommando9_Click:
    MsgBox Err.Description
    Resume Exit_Kommando9_Click

    Is there something wrong with it?

  8. #23
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You didn't use the ID field in the table (I would have), so you need the column with the text value:

    DoCmd.OpenReport stDocName, acPreview, , "Rom = '" & Me.Kombinasjonsboks7.Column(1) & "'"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #24
    Bill Casanova is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2011
    Posts
    13
    Quote Originally Posted by pbaldy View Post
    You didn't use the ID field in the table (I would have), so you need the column with the text value:

    DoCmd.OpenReport stDocName, acPreview, , "Rom = '" & Me.Kombinasjonsboks7.Column(1) & "'"
    Thank you! An other problem solved.

  10. #25
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. A Combo box that open another form
    By mar_t in forum Access
    Replies: 14
    Last Post: 01-09-2011, 10:53 PM
  2. Can you set a combo box to open links?
    By Procom Webserve in forum Access
    Replies: 2
    Last Post: 12-07-2009, 03:11 AM
  3. Combo box open reports
    By GUMUBIBI in forum Programming
    Replies: 5
    Last Post: 09-06-2009, 04:36 PM
  4. Open a form using a query that references a combo
    By accessbobp646 in forum Access
    Replies: 1
    Last Post: 02-22-2009, 09:50 AM
  5. Using combo box to open another form
    By ladyairj23 in forum Forms
    Replies: 0
    Last Post: 06-02-2006, 07:03 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