Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    ssissons is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    44
    Was just about to do that. Here it is. Issues is the main form.



    TTP.zip

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    There is no form by that name. I see the code though, and if I add a message box:

    strDocName = "TTP_Find"
    DoCmd.OpenForm strDocName, , , , , acDialog
    MsgBox "paul"

    I don't get the message box until I close the find form. Am I misunderstanding the problem?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    ssissons is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    44
    I'm so sorry! Apparently, I don't know where my issues really are (probably all in my head!). Turns out the REAL problem was that I was defining my public variables in the wrong place, and they weren't being updated properly. It seems to be working now. I apologize for wasting your time.

  4. #19
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    I have looked at the DB - the modal forms are working as you expected them to. where you do have issues though is getting the selected values recognized between forms.

    Take this line: Public varSelectedTTP As Variant, varFindTTP As Variant

    and move it to the declarations section of the MiscCode module, so that your two variables are recognized everywhere.

    You also have a problem with when you use those variables:

    In your Select statement in Issues, you are using VarSelectedTTP (text) , when you should be using varFindTTP (numeric ID).

    This line in the Issues form code is wrong: cboSystem!Value = !System

    It should be cboSystem.Value = !System

    One thing I suggest you always do - use Option Explicit in all your code modules.

    This forces you to explicitly declare all variables with a Dim statement somewhere, and you would be amazed at how many errors that catches when you compile your code (which you should always do as well).

    One thing you might want to do is add a few lines in TTP_Find to handle the case of a non-existant TTP number being entered and the Select button clicked.

    HTH

    John

  5. #20
    ssissons is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    May 2014
    Posts
    44
    Thank you. I will do that.

  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
    More info on John's suggestion:

    http://www.baldyweb.com/OptionExplicit.htm
    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. Replies: 2
    Last Post: 05-21-2014, 06:37 PM
  2. Command continues to popup message box..
    By Stephanie53 in forum Forms
    Replies: 12
    Last Post: 05-30-2013, 02:23 PM
  3. Close Button for Popup, non-modal from
    By P5C768 in forum Forms
    Replies: 3
    Last Post: 04-09-2013, 01:43 PM
  4. Replies: 1
    Last Post: 03-20-2013, 07:04 AM
  5. popup when opening a form
    By ajetrumpet in forum Forms
    Replies: 1
    Last Post: 10-08-2010, 09:33 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