Saving Records in Form view

Jonno

Registered User.
Local time
Today, 02:19
Joined
Mar 17, 2003
Messages
74
Good morning

Could someone explain the most efficient way to automatically save a record in form view after data in a table is updated? There are fields on the form which are updated to certain values when events occur, but this data is not always saved in the table.
(A97)
 
looking further, it seems to be only one particular field which does not save, the rest do save correctly. I can see nothing untoward in the properties for this Filed / Text box. i have tried

DoCmd.RunCommand acCmdSaveRecord

AfterUpdate but to no avail.

?????????
 
The thing is, the field is bound to a field in the record source, as are the other fields on the form. Sometimes it writes to the table, sometimes not. A result of a calculation from a query is updated into the field... a cannot understand the inconsistency.
 
Hi Pat

This is the code which is activated on a button click

Rem Updates Received and Shipped to N blank
Forms!form2!received = "N"
Forms!form2!fullyshipped = "N"



Rem Updates Received to N if discrepancy
If Forms!form2!im122 <> Forms!form2!liaison Then
Forms!form2!received = "N"
MsgBox ("IM122 Qty differs from Confirmed Liaison Qty")

End If

Rem Update Totals
DoCmd.OpenForm "hidden", acNormal, "", "", , acHidden
Forms!form2!Text40 = Forms!hidden!qty
DoCmd.Close acForm, "hidden"

Rem Updates Received to Y
If Forms!form2!im122 = Forms!form2!liaison Then
Forms!form2!received = "Y"

End If

Rem Updates Shipped to Y
If Forms!form2!received = "Y" And Forms!form2!Text40 = Forms!form2!liaison Then
Forms!form2!fullyshipped = "Y"

End If

Rem Updates shipped to N

If Forms!form2!Text40 <> Forms!form2!liaison Then
Forms!form2!fullyshipped = "N"

End If


The form called "Hidden" has a query as its source data. This is the part which has the problem - It couldnt be because it is using data from a query rather than a table is it?
Im not sure if this makes it any clearer...
 
The source query is a simple group/sum query, but I will take your advice and use code for this instead, see how I get on!
 

Users who are viewing this thread

Back
Top Bottom