This is what I am using...
Private Sub saveform_Click(Cancel As Integer)
LG3200GTotalYield = DAvg("[LG3200TotalYield]", "JUNE PRODUCTION",
"[LG3200TotalYield]<>0")
LG3300GTotalYield = DAvg("[LG3300TotalYield]", "JUNE PRODUCTION",
"[LG3300TotalYield]<>0")
LG4400GTotalYield = DAvg("[LG4400TotalYield]", "JUNE PRODUCTION",
"[LG4400TotalYield]<>0")
LG4500GTotalYield = DAvg("[LG4500TotalYield]", "JUNE PRODUCTION",
"[LG4500TotalYield]<>0")
LG4650GTotalYield = DAvg("[LG4650TotalYield]", "JUNE PRODUCTION",
"[LG4650TotalYield]<>0")
LG6100GTotalYield = DAvg("[LG6100TotalYield]", "JUNE PRODUCTION",
"[LG6100TotalYield]<>0")
Motorolav710GTotalYield = DAvg("[Motorolav710TotalYield]", "JUNE
PRODUCTION", "[Motorolav710TotalYield]<>0")
Motorolav265GTotalYield = DAvg("[Motorolav265TotalYield]", "JUNE
PRODUCTION", "[Motorolav265TotalYield]<>0")
Samsung650GTotalYield = DAvg("[Samsung650TotalYield]", "JUNE PRODUCTION",
"[Samsung650TotalYield]<>0")
Samsung670GTotalYield = DAvg("[Samsung670TotalYield]", "JUNE PRODUCTION",
"[Samsung670TotalYield]<>0")
LG3200GFctYield = DAvg("[LG3200FctYield]", "JUNE PRODUCTION",
"[LG3200FctYield]<>0")
LG3300GFctYield = DAvg("[LG3300FctYield]", "JUNE PRODUCTION",
"[LG3300FctYield]<>0")
LG4400GFctYield = DAvg("[LG4400FctYield]", "JUNE PRODUCTION",
"[LG4400FctYield]<>0")
LG4500GFctYield = DAvg("[LG4500FctYield]", "JUNE PRODUCTION",
"[LG4500FctYield]<>0")
LG4650GFctYield = DAvg("[LG4650FctYield]", "JUNE PRODUCTION",
"[LG4650FctYield]<>0")
LG6100GFctYield = DAvg("[LG6100FctYield]", "JUNE PRODUCTION",
"[LG6100FctYield]<>0")
Motorolav710GFctYield = DAvg("[Motorolav710FctYield]", "JUNE PRODUCTION",
"[Motorolav710FctYield]<>0")
Motorolav265GFctYield = DAvg("[Motorolav265FctYield]", "JUNE PRODUCTION",
"[Motorolav265FctYield]<>0")
Samsung650GFctYield = DAvg("[Samsung650FctYield]", "JUNE PRODUCTION",
"[Samsung650FctYield]<>0")
Samsung670GFctYield = DAvg("[Samsung670FctYield]", "JUNE PRODUCTION",
"[Samsung670FctYield]<>0")
LG3200GFlashYield = DAvg("[LG3200FlashYield]", "JUNE PRODUCTION",
"[LG3200FlashYield]<>0")
LG3300GFlashYield = DAvg("[LG3300FlashYield]", "JUNE PRODUCTION",
"[LG3300FlashYield]<>0")
LG4400GFlashYield = DAvg("[LG4400FlashYield]", "JUNE PRODUCTION",
"[LG4400FlashYield]<>0")
LG4500GFlashYield = DAvg("[LG4500FlashYield]", "JUNE PRODUCTION",
"[LG4500FlashYield]<>0")
LG4650GFlashYield = DAvg("[LG4650FlashYield]", "JUNE PRODUCTION",
"[LG4650FlashYield]<>0")
LG6100GFlashYield = DAvg("[LG6100FlashYield]", "JUNE PRODUCTION",
"[LG6100FlashYield]<>0")
Motorolav710GFlashYield = DAvg("[Motorolav710FlashYield]", "JUNE
PRODUCTION", "[Motorolav710FlashYield]<>0")
Motorolav265GFlashYield = DAvg("[Motorolav265FlashYield]", "JUNE
PRODUCTION", "[Motorolav265FlashYield]<>0")
Samsung650GFlashYield = DAvg("[Samsung650FlashYield]", "JUNE PRODUCTION",
"[Samsung650FlashYield]<>0")
Samsung670GFlashYield = DAvg("[Samsung670FlashYield]", "JUNE PRODUCTION",
"[Samsung670FlashYield]<>0")
LG3200GRFYield = DAvg("[LG3200RFYield]", "JUNE PRODUCTION",
"[LG3200RFYield]<>0")
LG3300GRFYield = DAvg("[LG3300RFYield]", "JUNE PRODUCTION",
"[LG3300RFYield]<>0")
LG4400GRFYield = DAvg("[LG4400RFYield]", "JUNE PRODUCTION",
"[LG4400RFYield]<>0")
LG4500GRFYield = DAvg("[LG4500RFYield]", "JUNE PRODUCTION",
"[LG4500RFYield]<>0")
LG4650GRFYield = DAvg("[LG4650RFYield]", "JUNE PRODUCTION",
"[LG4650RFYield]<>0")
LG6100GRFYield = DAvg("[LG6100RFYield]", "JUNE PRODUCTION",
"[LG6100RFYield]<>0")
Motorolav710GRFYield = DAvg("[Motorolav710RFYield]", "JUNE PRODUCTION",
"[Motorolav710RFYield]<>0")
Motorolav265GRFYield = DAvg("[Motorolav265RFYield]", "JUNE PRODUCTION",
"[Motorolav265RFYield]<>0")
Samsung650GRFYield = DAvg("[Samsung650RFYield]", "JUNE PRODUCTION",
"[Samsung650RFYield]<>0")
Samsung670GRFYield = DAvg("[Samsung670RFYield]", "JUNE PRODUCTION",
"[Samsung670RFYield]<>0")
End Sub
I have tried everything I know so far. And even when I change a field value,
I doesn't update right away. Is it because i have a long code?
Klatuu said:
Whenever you move off the current record, the fields are updated.
What is it you are expecting and what are you seeing?
--
Dave Hargis, Microsoft Access MVP
:
How can I set my form to update my fields as soon as a data changed?
I tried to do the AFTERUPDATE, BEFOREUPDATE, ONLOAD, but they are all not
doing it really. I have to close the form and reopen it for the code to work.
Can anybody help?