none
Access Web App if column Inactive = Yes then hide that data in drop down else Show it in drop down form RRS feed

  • Question

  • Hi all!

    I have a access table called Categories consisting of columns named "Inactive" with datatype Yes/No (False/True) and default its set to No(False).

    The other column is named ProductCategory with data type as Short text (String). 

    I want to have an expression or something else like macro etc. that will hide/Show the data based on this condition. The show/hide is supposed to act in the form that gets the data from Categories table.

    So the logic is

    If Category.Inactive = Yes

    Then Hide Form.Category.thatDataInDropdown

    If Category.Inactive = No(default) 

    Then Show Form.Category.thatDataInDropdown

    So per default all data should be shown in the Form.Category.Dropdowncolumn and if there is record that have been set to Yes by a user then it should hide that Category record.

    This logic feels pretty simple but I havent figured it out how to solve so please help me on this, thanks½

    BR

    Hankman


    Hankman3000

    Tuesday, February 14, 2017 9:25 AM

Answers

  • Hi Hankman,

    >> So per default all data should be shown in the Form.Category.Dropdowncolumn and if there is record that have been set to Yes by a user then it should hide that Category record.

    What do you mean by Dropdowncolumn? There is no DropDown control in Access 2013 web app form. Is it a combobox in List View or a field in table? Do you want to hide the record in combobox or anywhere according Category.Inactive?

    If you want to hide the record in combox, I would suggest you create a new query with where statement by Category.Inactive, and set the datasource of combobox by this new query.

    If I misunderstood you, it would be helpful if you could share us a screen shot about your current result and add description to the screen shot to share us your requirement.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Hankman3000 Wednesday, February 15, 2017 11:00 AM
    Wednesday, February 15, 2017 8:08 AM

All replies

  • Hi all!

    I have a access table called Categories consisting of columns named "Inactive" with datatype Yes/No (False/True) and default its set to No(False).

    The other column is named ProductCategory with data type as Short text (String). 

    I want to have an expression or something else like macro etc. that will hide/Show the data based on this condition. The show/hide is supposed to act in the form that gets the data from Categories table.

    So the logic is

    If Category.Inactive = Yes

    Then Hide Form.Category.thatDataInDropdown

    If Category.Inactive = No(default) 

    Then Show Form.Category.thatDataInDropdown

    So per default all data should be shown in the Form.Category.Dropdowncolumn and if there is record that have been set to Yes by a user then it should hide that Category record.

    This logic feels pretty simple but I havent figured it out how to solve so please help me on this, thanks½

    BR

    Hankman


    Hankman3000

    Monday, February 13, 2017 9:15 AM
  • Hi Hankman,

    Thanks for visiting our forum.

    Then here we mainly focus on general questions and feedback about Office client. Since your query is more related to the development of Access Web App, I'll your thread to the following dedicated MSDN forum for Access:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=accessdev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Your understanding is appreciated.

    Best regards,
    Yuki Sun


    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, February 14, 2017 6:57 AM
  • Thanks Yuki!

    Sorry but its not so obvious for me. The system is complex, on the other hand it should be complex I guess since there is a lot different forum. Maybe the navigation could still be better.

    BR

    Hankman


    Hankman3000

    Tuesday, February 14, 2017 9:30 AM
  • Hi Hankman,

    >> So per default all data should be shown in the Form.Category.Dropdowncolumn and if there is record that have been set to Yes by a user then it should hide that Category record.

    What do you mean by Dropdowncolumn? There is no DropDown control in Access 2013 web app form. Is it a combobox in List View or a field in table? Do you want to hide the record in combobox or anywhere according Category.Inactive?

    If you want to hide the record in combox, I would suggest you create a new query with where statement by Category.Inactive, and set the datasource of combobox by this new query.

    If I misunderstood you, it would be helpful if you could share us a screen shot about your current result and add description to the screen shot to share us your requirement.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Hankman3000 Wednesday, February 15, 2017 11:00 AM
    Wednesday, February 15, 2017 8:08 AM
  • Thanks Edward!

    Thats what I was looking for. 

    I have to also map tblUser.ID to qryUser but I figured it out.

    Of course I mean combobox sorry for puzzled you and thanks once again.

    BR

    Hankman


    Hankman3000

    Wednesday, February 15, 2017 11:04 AM