Results 1 to 12 of 12
  1. #1
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48

    Pop-up Forms

    I have a database that tracks my customers and the projects they request. I currently have created a form with my customers information and inserted a subform that shows a list of every project I'm working on for that customer.

    Here is what I want to do:
    I want to remove this subform and turn it into a button I can click that opens a new window with a list of that customers projects. I want to be able to edit (edit, remove, and add) the projects for that customer.

    What I have tried so far:
    I tried adding a button that opened the subform but instead of just showing the projects for that customer, it shows all the projects for all my customers.

    Any advice on how to do this is greatly appreciated. The only knowledge I lack is Visual Basic and Macro's (I know..."only" is a strong word).



    TIA for all your help.

    -Justin

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    This should get you started:

    http://www.baldyweb.com/wherecondition.htm

    For new records, you can grab the customer from the main form, or pass it in OpenArgs.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48
    pbaldy,

    I don't know VBA. I get this is code but I have no idea where to put it and how to set it up.

    Quote Originally Posted by pbaldy View Post
    This should get you started:

    http://www.baldyweb.com/wherecondition.htm

    For new records, you can grab the customer from the main form, or pass it in OpenArgs.

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

  5. #5
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48
    Very much! Thank you. I'll let you know if I'm successful.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48
    I'm failing.

    Here is what I have but it keeps saying there is an error:

    DoCmd.OpenForm "[Projects]", , , "FieldName = [CustomerNumber]" & Me.CustomerNumber

    Does this look right?

    Quote Originally Posted by pbaldy View Post
    Happy to help!

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    More like:

    DoCmd.OpenForm "[Projects]", , , "[CustomerNumber] = " & Me.CustomerNumber
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48
    Still no luck. Keeps telling me the form name is wrong. I've tried "Forms![Projects]", "[Projects]", "Projects", "_Projects".....what else is left?

    Quote Originally Posted by pbaldy View Post
    More like:

    DoCmd.OpenForm "[Projects]", , , "[CustomerNumber] = " & Me.CustomerNumber

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you attach the db here? I'd expect "Projects" to work, presuming that's the name of the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48
    I wish I could. Unfortunately, it's proprietary. The company won't allow me.

    Quote Originally Posted by pbaldy View Post
    Can you attach the db here? I'd expect "Projects" to work, presuming that's the name of the form.

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If it's complaining about the name of the form, the name must not be correct.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 7
    Last Post: 11-06-2017, 01:23 PM
  2. Replies: 2
    Last Post: 04-05-2016, 08:29 AM
  3. Replies: 3
    Last Post: 03-23-2016, 12:45 PM
  4. Replies: 2
    Last Post: 11-05-2014, 09:16 AM
  5. Replies: 4
    Last Post: 04-01-2009, 08:49 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