Results 1 to 4 of 4
  1. #1
    pbs is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    6

    How to make a filed hidden

    question



    i have two fields in ms access 2019 database.
    one field "lv" = y / n and another field "number" = numeric.
    if I click (yes) on lv then I want only the number field to be hidden for the concerning record.
    if I click on lv again, the number must be released again.

    Please can anyone help me, iam not very good with VB

    Thanks in advance.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Depends on what kind of form you have there. IIRC, cannot use conditional formatting for control visible property, which would be the only way to affect a control on a per record basis. Thus can only be done with a single record form, using form Current event and AfterUpdate event of the checkbox. For current event:

    Code:
    Private Sub Form_Current()
      Me.[Number].Visible = Me.lv
    End Sub
    EDIT - Number is a reserved word and shouldn't be used for object names in Access:
    http://www.allenbrowne.com/AppIssueBadWord.html
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    pbs is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    6
    He micron
    Het verbergen van het veld moet inderdaad in een formulier gebeuren, daar heb ik het j/n veld ook staan, dus als ik dat aanklik in een record moet het veld " aantal" verborgen worden, klik ik weer op lv dan moet het weer tevoorschijn komen.
    Met andere woorden, er zijn records waar het veld aantal zichtbaar zal zijn en andere record waar het veld aantal onzichtbaar is.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You are welcome to post in your native language, but IMHO you need to post the English translation as well for the benefit of others who might need a solution to the same problem. It would be considerate of you if those who are trying to help you didn't have to do the work of translating.
    Translation of last post according to Google translate:
    The hiding of the field must indeed be done in a form, I have the y / n field there too, so when I click that in a record, the field "number" must be hidden, I click on lv again then it must appear again come.
    In other words, there are records where the count field will be visible and other records where the count field is invisible.
    Since you still haven't revealed which type of form you have, there is nothing else I can add for now regarding visibility of a control except: if your form is a continuous form you can probably use conditional formatting to set control properties to fake being invisible (font and background being the same colour and no border). However, if a user clicks on this control or tabs into it, it will be obvious that something is there, plus data can be changed as the control won't be locked.

    Dutch version of the response
    Omdat je nog steeds niet hebt onthuld welk type formulier je hebt, kan ik voorlopig niets anders toevoegen met betrekking tot de zichtbaarheid van een besturingselement, behalve: als je formulier een doorlopend formulier is, kun je waarschijnlijk voorwaardelijke opmaak gebruiken om de eigenschappen van het besturingselement in te stellen op nep zijn onzichtbaar (lettertype en achtergrond hebben dezelfde kleur en geen rand). Als een gebruiker echter op dit besturingselement klikt of erop klikt, is het duidelijk dat er iets is en kunnen gegevens worden gewijzigd omdat het besturingselement niet wordt vergrendeld.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-08-2019, 07:40 AM
  2. Replies: 14
    Last Post: 10-30-2018, 01:20 PM
  3. Replies: 3
    Last Post: 10-26-2014, 06:35 PM
  4. Replies: 2
    Last Post: 10-21-2013, 03:50 PM
  5. Replies: 9
    Last Post: 04-20-2012, 08:13 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