I have two tables tblPets and tblVisits and two forms named, respectively, frmPets and frmVisits.
On the frmVisits form I have a unbound field with a DLookup which, for the current record
on frmVisits goes to table tblPets, looks up the weight of the pet concerned and places it in the unbound field on frmVisits.
Fine so far!
I have bound field on the frmvisits called WeightToday with a name of txtWeightToday.
What I need to happen is that when the weight is entered into this field (on frmVisits) and the current record saved, is for that
weight to replace the previous weight in tblPets so that, on the next visit, the unbound field on frmVisits now shows
the latest value i.e. the value of txtWeightToday.
I have tried this code
[code]
Private Sub txtWeightToday_AfterUpdate()
Forms!frmPets.txtWeight = Me.txtWeightToday
End Sub
[/code]
but get an error message saying that it cannot find the referenced form i.e. frmPets
Has anyone any idea why this code will not work and importnatly how to get it to work?
Any assistance will be greatly appreciated.
Regards
Cheyanne