Bottone che genera il codice fiscale....

L

lebroki

anagrafici dei miei clienti e in una casella di testo (Testo65)
mi viene generato il codice fiscale.
Questo codice fiscale dovrebbe diventare
la chiave primaria della tabella confluendo in
nel campo CodFisc.

Ho provato in diversi modi ma non sono riuscito
nel mio intento.

su evento After
su evento Before

ho inserito

me.testo65 = me.CodFisc

Ma niente da fare, come posso risolvere?

Grazie a cinzia ho capito come fare e dove inserire
l'evento,

ma ora ripensandoci, è possibile far generare
il codice fiscale e inserirlo in uno specifico campo
della maschera con un bottone?

io inseirei nella maschera un bottone a lato del controllo (CODFISC)
che è un campo della tabella TBLCLIENTI, che cliccato mi genera
il codice e lo inserisce nel suddetto campo CODFISC.

immagino che con DoCmd.... e qualche altra linea di codice...

Grazie
 
E

Evi

I hope your English is better than my Italian, lebroki, check if I have
understood this correctly.
You want to press a button and have the text in textbox Testo65 inserted
into the field CodFisc in TBLCLIENTI where it will become the Primary Key
field of that table

Question: E la CodFisc campo, testo o nomero?

Se testo, use this in the On Click Event of the Button

DoCmd.RunSQL ("INSERT INTO TblClienti (CodFisc) VALUES (""" & Me.Testo65 &
""")")



That is 3 Quotation marks (contrassegni di citazione) (") before the '&'

3 after the &

1 Quotation mark after the bracket )



Se CodFisc e nomero:



DoCmd.RunSQL ("INSERT INTO TblClienti (CodFisc) VALUES (" & Me.Testo65 &
")")



Evi







lebroki said:
anagrafici dei miei clienti e in una casella di testo (Testo65)
mi viene generato il codice fiscale.
Questo codice fiscale dovrebbe diventare
la chiave primaria della tabella confluendo in
nel campo CodFisc.

Ho provato in diversi modi ma non sono riuscito
nel mio intento.

su evento After
su evento Before
In the Before Event
the After Event
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top