17. december 2006 - 16:15Der er
12 kommentarer og 1 løsning
Vis / Skjul kommandoknap afhængig af indhold af felt
Jeg har en underformular, som viser alle felter fra en bestemt post brugeren har klikket sig ind på. Et af mine felter i underformularen er et notatfelt som kan indeholde meget tekst eller ingen. Hvis notatfeltet indeholder data vil jeg gerne vise en knap/link, så brugeren kan klikke sig videre og se notatet.
Hvordan kan jeg skjule kommandoknappen, hvis notatfeltet ikke indeholder nogen data?
Hi Terry The memo field can contain quite a big amount of text, so I choose not to show it to keep my form nice and neat. Sometimes the memo field is blank which is why I want to show or hide a button/link that show a new form with the memo field.
The problem with trying to hide a button on a continuous form is that when you hide on then they all (all records) get hidden.
What you could do was maybe show only the first 20 or so characters and then if the user double clicks on the field, open another form (dialog) where you show the whole text if there is any.
Hi again terry Thx for responding so quick. Im a little new to Access, so im not sure where to put the code. Where can I find "on current event" in my form?
Hey again mr.t :) I have a few other buttons on the form but they dont seem to be affected.
I was thinking since each button has a unique name the "YourButtonName" would only be affected. Does that sound right to you?
After playing around I was thinking about using faneblade(dont know the english name, tabs maybe) for the memo fields I have. It would be more user friendly I think.
But since im pretty new to Access im probably going to ask for some more help sometime soon :)
If it isnt a continuous form (more than one record in list) then it wont effect the other buttons (with other names).
Yes, a tab control might be an idea.
See you around :o)
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.