AUTOMATIC UPDATE

  • Thread starter Thread starter Alimbilo
  • Start date Start date
A

Alimbilo

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?
 
Whenever you move off the current record, the fields are updated.
What is it you are expecting and what are you seeing?
 
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?
 
It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
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?
 
Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


Klatuu said:
It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
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?
 
Is the form a bound form or an unbound form?
What Save button are you using?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


Klatuu said:
It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
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?


:

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?
 
The Form is bound to a Table.
I am using a Command Button.


Klatuu said:
Is the form a bound form or an unbound form?
What Save button are you using?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


Klatuu said:
It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


:

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?


:

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?
 
Post the code in the command button's Click event.
What you are describing really makes no sense.
When you change a value in a control and then navigate away from the current
record, the record is updated. If you navigate back to the record, the value
entered the control should be displayed.
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
The Form is bound to a Table.
I am using a Command Button.


Klatuu said:
Is the form a bound form or an unbound form?
What Save button are you using?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


:

It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


:

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?


:

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?
 
I encountered something similar before.

I managed to get mine working with

me!Requery
me!Refresh

no idea why the concurrent use of both works for me, hopefully it does the
same for you

Alimbilo said:
Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


Klatuu said:
It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
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?


:

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?
 
I know that it make no sense. I told myself that too.
I did put the code in the Click event.

I which that I could send you the all database to check it by yourself.
I will tried to play with it more.

Thanks

Klatuu said:
Post the code in the command button's Click event.
What you are describing really makes no sense.
When you change a value in a control and then navigate away from the current
record, the record is updated. If you navigate back to the record, the value
entered the control should be displayed.
--
Dave Hargis, Microsoft Access MVP


Alimbilo said:
The Form is bound to a Table.
I am using a Command Button.


Klatuu said:
Is the form a bound form or an unbound form?
What Save button are you using?
--
Dave Hargis, Microsoft Access MVP


:

Because everytime I click on Save, it doesn't change the value. i have to
close the form, open it again and click on Save one more time for it to work.

Please help.


:

It has nothing to do with the length of the code.
What makes you think it is not updating?
--
Dave Hargis, Microsoft Access MVP


:

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?


:

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?
 
Back
Top