I am not good at this but could somebody who is have alook at my code and tell me if it is total crap or what
what I want it to do is look at the farmer find his field details and add up the total hectares he has providing that the field is planed to be used that season (there is a seven year cycle)I can tell this through the field seasonal details table.
Answer=0
totals=0
GOTO TOP In Field_Plot_Seasonal
Do WHILE NOT EOF()
IF field_plot_seasonal.fps_sorg = thisform.combo1.value
IF field_plot_seasonal.fps_season = thisform.distinct_values_combo2.Value
GOTO TOP IN Field_plot_static
Do WHile NOT EOF()
If Field_plot_static.Fpd_sorg = Thisform.combo1.value
Answer=Field_plot_static.fpd_farea
Totals = totals+answer
SKIP
ENDI
ENDDO
ENDI
ENDIF
SKIP
ENDDo
It does different things every time I run it.
SOme times it appears to put up a number other times it makes all the fields on the form blank and greyed out.
AS is blatently obvious by this I have not done much coding before.
Please help me
Rachel
what I want it to do is look at the farmer find his field details and add up the total hectares he has providing that the field is planed to be used that season (there is a seven year cycle)I can tell this through the field seasonal details table.
Answer=0
totals=0
GOTO TOP In Field_Plot_Seasonal
Do WHILE NOT EOF()
IF field_plot_seasonal.fps_sorg = thisform.combo1.value
IF field_plot_seasonal.fps_season = thisform.distinct_values_combo2.Value
GOTO TOP IN Field_plot_static
Do WHile NOT EOF()
If Field_plot_static.Fpd_sorg = Thisform.combo1.value
Answer=Field_plot_static.fpd_farea
Totals = totals+answer
SKIP
ENDI
ENDDO
ENDI
ENDIF
SKIP
ENDDo
It does different things every time I run it.
SOme times it appears to put up a number other times it makes all the fields on the form blank and greyed out.
AS is blatently obvious by this I have not done much coding before.
Please help me
Rachel