IALweb Homepage
Forum Home Forum Home > MS Office > Microsoft Office > Microsoft Access
  New Posts New Posts RSS Feed - Disattivare un campo
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

 Topic   Topic Hot   Topic New   Topic Locked   Topic Sticky   Topic Hidden

Topic ClosedDisattivare un campo

 Post Reply Post Reply
Author
Message
freedom View Drop Down
Nuovo Utente
Nuovo Utente


Joined: 03/Mag/2007
Status: Offline
Points: 3
Direct Link To This Post Topic: Disattivare un campo
    Posted: 03/Mag/2007 at 13:06
Salve. ho l'esigenza in una tabella di disattivare campo2 (di tipo testo) qualora campo1 (di tipo si/no) sia spuntato..... nella relativa maschera campo1 è gestito attraverso una casella di controllo. Grazieeeeeee !  
Back to Top
Xavier View Drop Down
Super Moderatore
Super Moderatore
Avatar

Joined: 23/Giu/2006
Location: Italy
Status: Offline
Points: 3751
Direct Link To This Post Posted: 03/Mag/2007 at 13:32
Allora sulle evento onChange di campo1, devi eseguire uno spezzone di codice..

- Controlli se il valore selezionato sia il si o il no
- A seconda di questo valore abiliti o disabiliti il campo2.

Ora non so esattamente come funziona perchè non ho sottomano access per vedere se funziona il codice :

Quote

Dim valore as String
Set valore = campo1.value

if valore = "Si" Then
    campo2.enabled = false 
    Else
       campo2.enabled = true
End if



ti ripeto che questa è un idea così al volo, perchè non ho access con cui testarla e migliorarla...

cmq ti butto li uno spunto..

ciao ciao
ale
Per richieste inviatemi MP

Usate SEMPRE il tasto cerca e siate chiari nelle discussioni

MY WEBSIT
Back to Top
accessato View Drop Down
Moderatore
Moderatore
Avatar

Joined: 12/Apr/2007
Location: Italy
Status: Offline
Points: 2869
Direct Link To This Post Posted: 03/Mag/2007 at 14:43

cmq campo2 puo' essere disattivata sulla maschera, non sulla tab.

Dim valore as String
Set valore = campo1.value

if valore = "0" Then
    campo2.visible = false 
    Else
       campo2.visible = true
End if
magari disabilitando il controllo devi prevedere degli eventi di errore che dovrai gestire da codice..cia'

Back to Top
freedom View Drop Down
Nuovo Utente
Nuovo Utente


Joined: 03/Mag/2007
Status: Offline
Points: 3
Direct Link To This Post Posted: 05/Mag/2007 at 21:51
Grazie per le vostre indicazioni... anche sele avevo già provate e disattivavo (nella mschera tutti i campi, anche di più record). alla px
Back to Top
Xavier View Drop Down
Super Moderatore
Super Moderatore
Avatar

Joined: 23/Giu/2006
Location: Italy
Status: Offline
Points: 3751
Direct Link To This Post Posted: 07/Mag/2007 at 11:21
Ma hai risolto oppure il problema è rimasto cmq??

se è rimasto, dillo e spiegati meglio che vediamo di trovare una soluzione..

ale
Per richieste inviatemi MP

Usate SEMPRE il tasto cerca e siate chiari nelle discussioni

MY WEBSIT
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.11
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0,375 seconds.