Results 1 to 10 of 10
  1. #1
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25

    Manipulating list from an other form

    I have a button in formA. When I click on it I want it to show the listB.

    (To show it I used the event code: ListB.Visible = True)

    The thing is, listB is in formB (wich is a subform of formA).

    Code isnt working because listB doesnt exist in formA, got an error code.



    I tried [Form]![FormB].ListB.Visible = True
    but it didn't work, I don't think I can do this in an event code.

    Thx for helping a geek out.

  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,641
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25
    Quote Originally Posted by pbaldy View Post

    Good to know!

    In my case I would use to refer to a control, if i am on main form: Me!formB.Form!ListB.Visible = true ?

  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,641
    Looks okay; did you try it?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25
    I think my reply didn't work.

    In order to make my list visible I would use "to refer to a control" from "main form": Me!Subform1.Form!ControlName

    Me!FormB.Form!ListB.Visible = True

    (I'm trying it atm but it is not working, my form name is not formB but actually something like "the form (b)". Do I need to write it like "the_form_(b)" in the event code?

  6. #6
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25
    Just created a form "Test" and a list "ListTest". Added that to my formA and the code Me!Test.Form!ListTest.Visible = true IS WORKING.

    I just need to know how to correctly write down "the form (B)" in event code

  7. #7
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25
    Me!("The form (b)").Form!formB.Visible = True


  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,641
    Because of the inadvisable spaces and symbols it has to be bracketed. Try

    Me![The form (b)].Form!ListB.Visible = True
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    alka is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    25
    Thanks alot for the help!

  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,641
    No problem, and welcome to the site by the way!
    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. manipulating a queries
    By kfc in forum Access
    Replies: 1
    Last Post: 10-19-2012, 08:41 PM
  2. Need some help manipulating database columns
    By flightsimguy in forum Queries
    Replies: 7
    Last Post: 02-17-2012, 02:22 AM
  3. Manipulating text string
    By genemd in forum Queries
    Replies: 4
    Last Post: 10-21-2011, 05:04 AM
  4. Replies: 2
    Last Post: 06-01-2011, 08:36 AM
  5. Manipulating Form&Query Sources
    By dinorbaccess in forum Forms
    Replies: 3
    Last Post: 12-30-2010, 11:11 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