Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
  1. #16
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Your file did not get properly attached - errors as "Invalid".

    Agree that everything looks good and only issue may be accented letter which I most likely cannot resolve because my system is English.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    Join Date
    Nov 2019
    Posts
    21
    Attachment 40327

    Update, I dont know what does this mean

  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,518
    Quote Originally Posted by June7 View Post
    Your file did not get properly attached - errors as "Invalid".
    If you mean the attachment in post 13, it works for me and is basically the same picture as in post 14 (in other words you're not missing anything).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    Join Date
    Nov 2019
    Posts
    21

    Db

    1. Base de Dados Clientes.accdb

    I think I attached the db

  5. #20
    Join Date
    Nov 2019
    Posts
    21
    I already tried without the accented words, and the result is the same

  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,518
    The test is executing successfully for me. I suspect you need to set all the values appropriate to each selection. In other words, not just the ones you want visible, but the ones you want hidden. Behind the combo I set

    Me.ClienteDesde.Visible
    equal to true in the If and false in the Else. Changing selections changed the visibility as expected.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #22
    Join Date
    Nov 2019
    Posts
    21
    Quote Originally Posted by pbaldy View Post
    The test is executing successfully for me. I suspect you need to set all the values appropriate to each selection. In other words, not just the ones you want visible, but the ones you want hidden. Behind the combo I set

    Me.ClienteDesde.Visible
    equal to true in the If and false in the Else. Changing selections changed the visibility as expected.

    But in the code is set not only the ones I want visible (me.xxxxxx.visible = true) but also the ones to be hidden (me.xxxxx.visible = false)

  8. #23
    Join Date
    Nov 2019
    Posts
    21
    There are values that appear in both and values that should appear only when a specific value in TipoPessoa Combo Box is selected

  9. #24
    Join Date
    Nov 2019
    Posts
    21
    Can you send the db as altered by you

  10. #25
    Join Date
    Nov 2019
    Posts
    21
    I know what happen. Copy Paste done wrong. I don't believe it. ahahahah

  11. #26
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The code is running fine, it's your values. You probably have copy/paste issues. Here are some lines from the If, but sorted:

    Me.CódigoPostal1.Visible = False
    Me.CódigoPostal1.Visible = True
    Me.CódigoPostal2.Visible = False
    Me.CódigoPostal2.Visible = True
    Me.DataNascimento.Visible = False
    Me.DataNascimento.Visible = True

    See the problem? You're setting the same fields one way and then the other, so you'll end up with whatever ran last.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #27
    Join Date
    Nov 2019
    Posts
    21
    However now it does not give me PessoaJurídica

  13. #28
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by BrunoAlbuquerque.jur View Post
    I know what happen. Copy Paste done wrong. I don't believe it. ahahahah
    Ah, you caught it. Don't worry, we've all done it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #29
    Join Date
    Nov 2019
    Posts
    21
    Ok, the problem is that when I pass through the clients it does not auto run in order to see only what is suppose to

  15. #30
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by BrunoAlbuquerque.jur View Post
    However now it does not give me PessoaJurídica
    Not sure what you mean. The "Else" code is executing, you just have to make sure you set every control's visibility as desired. If something was visible for the first selection, it won't hide for the second selection unless you tell it to.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 06-18-2015, 09:37 PM
  2. Replies: 3
    Last Post: 01-31-2015, 07:24 PM
  3. Replies: 9
    Last Post: 11-01-2013, 11:56 AM
  4. Replies: 11
    Last Post: 10-12-2012, 08:37 AM
  5. IIF statement based on check box returns #error
    By timmygrover in forum Queries
    Replies: 7
    Last Post: 09-04-2012, 04:41 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