Results 1 to 5 of 5
  1. #1
    sren is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    36

    Issue with Form Automatically Opening When It Should Not

    I have 2 forms in my database: frm_Main and frm_PInfo.

    The frm_Main is where all of my links are for running reports, queries, exporting data, etc. The frm_PInfo is a form where a user can edit information from the tbl_PInfo, in a form format versus them trying to do it directly in the table.

    When I am running items from frm_Main, for no reason that I am aware of, the frm_PInfo keeps opening. I have looked at the property settings on frm_PInfo and can find no reason for it to be doing this.
    Example: I have an item on the frm_Main that simply opens a query for me to take a look at the results (code posted below). When I click on this link, it opens the query however it also opens frm_PInfo.

    Code:
    Private Sub ctlControlSheets_LetterTypes_Click()
    DoCmd.OpenQuery "qry_map_ControlSheet_LetterTypes", acViewNormal, acReadOnly
    End Sub




    Has anyone ever experienced this? If so, is there anything I can do to prevent this from happening?

    Thanks!!!!
    sren

  2. #2
    sren is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    36
    Please disregard....I was able to figure it out! Thanks.

    Happy New Year's to all.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Care to share how you solved the problem?

    Maybe it will help someone else........

  4. #4
    sren is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    36
    Hi Steve...

    The problem was a senseless mistake on my part. I had a Hyperlink SubAddress on some of my commands (not the forms - which is what I kept checking) that was causing the issue. Instead of being a 'space' in the subaddress slot, I had somehow pasted the name of the form that kept opening. The end result is that after executing any command on those links, it then went and opened the form. I isolated the issue by changing the name of the form (temporarily) to see if I could make any sense out of why it was opening. Once I received the error that the form name was invalid, I knew it had to be attached somewhere in properties or code. I then started going through each of the links and discovered the issue.

    Definitely not rocket science......a result of my inexperience. Hopefully though, if someone new to Access makes the same mistake, this may help them. Thanks for asking.

    Thanks.
    sren

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Makes sense. I have done the same type of "paste" error. Don't you love "Cut and Paste".....(gets me in trouble.)

    Thanks for the explanation.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-12-2012, 02:35 PM
  2. Issue w/ VBA code for Opening/Closing Forms
    By need_help12 in forum Forms
    Replies: 5
    Last Post: 04-20-2012, 11:09 AM
  3. opening access file issue
    By Masterkui in forum Access
    Replies: 3
    Last Post: 07-26-2011, 06:25 AM
  4. Access opening issue
    By tmcrouse in forum Database Design
    Replies: 1
    Last Post: 07-23-2010, 08:06 PM
  5. Replies: 0
    Last Post: 11-10-2008, 12:32 PM

Tags for this Thread

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