I explain you
Generally, we at fivewin always start from a Browse and call the insertion and modification procedures
I would like to adopt another technique but I don't know how I can do it.
When the user loads the management of an archive the procedure must already display the dialog with all the controls
as seen in the figure
but the controls must be disabled except the first and first button (red circle)
By pressing this button the user can view a table with the archive and
select a record.
- Code: Select all Expand view RUN
@ 3, 58 BUTTONBMP oBtn1 PROMPT "..." SIZE 9, 9.6 PIXEL OF oFrmIve ;
ACTION Select_CodiciIva(aGet,oBtn)
As soon as the user selects a record, all controls are populated immediately
- Code: Select all Expand view RUN
- cCodice := oTabIva:codice
cDescrizione := oTabIva:desc
nTipo := oTabIva:num7
nSoggetto := oTabIva:Num6
cOpzione1 := oTabIva:alfa1
cOpzione2 := oTabIva:alfa2
If substr(cOpzione1,3,1)= "S"
lOpzione1 :=.t.
elseif substr(cOpzione1,1,1)= "S"
lOpzione2 :=.t.
elseif substr(cOpzione2,1,1)= "S"
lOpzione3 :=.t.
Endif
nAliquota := oTabIva:num1
nVentilazione := oTabIva:num2
nIndetraibile := oTabIva:num5
lComunicazione_annuale:= IIF(substr(oTabIva:alfa1,4,1)="S",.t.,.f.)
aGet[1]:ctext:= cCodice
aGet[2]:ctext:= cDescrizione
aGet[3]:nOption(nTipo)
aGet[4]:nOption(nSoggetto)
aGet[5]:SetCheck(lOpzione1)
aGet[6]:SetCheck(lOpzione2)
aGet[7]:SetCheck(lOpzione3)
aGet[8]:ctext:= nAliquota
aGet[9]:ctext:= nVentilazione
aGet[10]:ctext:= nIndetraibile
aGet[11]:SetCheck(lComunicazione_annuale)
For n=1 to len(aget)
aGet[n]:disable()
next
For n=1 to len(aget)
aGet[n]:refresh()
next
Now I use variables but here I have the problem because if I use directly che field of archive I have for a sample
oTabIva:codice instead of cCodice
then I save I cannot have the all variables
at this point the user can press the "Edit" button (Modifica) if he needs to make a edit record
the controls must be enable and the user can edit them
- Code: Select all Expand view RUN
Function Edit_Iva(aGet,oBtn,oFrmIve)
oBtn[1]:Enable()
oBtn[2]:Enable()
oBtn[3]:Disable()
oBtn[4]:Disable()
For n=1 to len(aget)
aget[n]:enable()
Next
return nil
any solution pls