Nope. apparently it was working all along. I just hadn't check it
completely. The "Coment" field has been a spelling error I've been living
with for awhile.
Thanks for your help.
> So you're not going to tell me *why* it wasn't working? Hmm, makes me
think
> it was a spelling error ...
> ;-)
> --
> Dirk Goldgar
> (remove NOSPAM from reply address)
> > It's working. Thanks!!
> > > Have you stepped through the code in Debug mode? It looks to me as
> though
> > > it should work, provided that (1) one or more matching records are
> found,
> > > and (2) the field name in the Contacts table is really named "Coment",
> not
> > > "Comment" as I'd expect.
> > > Unrelated notes:
> > > I think you should probably check rstAct.NoMatch after your call to
> > > rstAct.FindFirst. I can't recall offhand whether this is absolutely
> > > essential since you're testing for the equality of your search key --
> I'll
> > > leave it to you to look it up. Also, I don't see any reason to
> repeatedly
> > > .Edit and .Update the same record if you have more than one matching
> > rstAct
> > > record. I'd do something like
> > > rstAct.FindFirst ...
> > > If Not rstAct.NoMatch Then
> > > rstCon.Edit
> > > Do While rstAct!Contact = rstCon!Key
> > > ' ... set various fields in rstCon record ...
> > > rstAct.MoveNext
> > > If rstAct.EOF Then Exit Do
> > > Loop
> > > rstCon.Update
> > > End If
> > > --
> > > Dirk Goldgar
> > > (remove NOSPAM from reply address)
> > > > I appreciate your help. The contents of the memo field are not
being
> > > > copied. Here's the code:
> > > > Private Sub Command0_Click()
> > > > Dim db As Database
> > > > Dim rstCon As Recordset
> > > > Dim rstAct As Recordset
> > > > Dim strSearch As String
> > > > Dim strTemp As String
> > > > Set db = CurrentDb
> > > > Set rstCon = db.OpenRecordset("SELECT * FROM Contacts;")
> > > > Set rstAct = db.OpenRecordset("SELECT * FROM Activity ORDER by
> > > > Activity.Contact, Activity.Date;")
> > > > rstCon.MoveFirst
> > > > Do While Not rstCon.EOF ' loop through the Contacts
> table
> > > > strSearch = rstCon!Key
> > > > strSearch = "[Contact] = " & rstCon!Key
> > > > rstAct.FindFirst strSearch ' find the first matching
> > > activity
> > > > record. Update initial call date and other record info.
> > > > 'MsgBox (rstCon![Company Name])
> > > > strTemp = rstAct!Key
> > > > If rstAct!Contact = rstCon!Key Then
> > > > rstCon.Edit
> > > > rstCon!InitCallDate = rstAct!Date
> > > > rstCon!DateOfLastCall = rstAct!Date
> > > > If Not IsNull(rstAct!PresentationDate) Then
> rstCon!Presented
> > =
> > > > True
> > > > rstCon!PresentationDate = rstAct!PresentationDate
> > > > rstCon!Coment = rstCon!Coment & "; " & rstAct!Comments
> > > > rstCon!PresentedResult = rstAct!PresentedResult
> > > > 'rstCon!Status = rstAct
> > > > rstCon!AptDateSet = rstAct!AptDateSet
> > > > rstCon!AptTimeSet = rstAct!AptTimeSet
> > > > rstCon!NextCall = rstAct!NextCall
> > > > rstCon!DateofNextContact = rstAct!NextCall
> > > > 'rstCon!TimeofNextCall =
> > > > rstCon!InsExDate = rstAct!InsRenewHealth
> > > > rstCon!WCExDate = rstAct!InsRenewWC
> > > > rstCon!NoEmpHealth = rstAct!NoEmpHealth
> > > > rstCon!NoEmpWC = rstAct!NoEmpWC
> > > > rstCon.Update
> > > > End If
> > > > rstAct.MoveNext
> > > > Do While rstAct!Contact = rstCon!Key 'find the Activity for
> the
> > > > Contact ' see if there's more activity for this contact.
> > > > rstCon.Edit
> > > > rstCon!DateOfLastCall = rstAct!Date
> > > > If Not IsNull(rstAct!PresentationDate) Then
> rstCon!Presented
> > =
> > > > True
> > > > rstCon!PresentationDate = rstAct!PresentationDate
> > > > rstCon!Coment = rstCon!Coment & "; " & rstAct!Comments
> > > > rstCon!PresentedResult = rstAct!PresentedResult
> > > > 'rstCon!Status = rstAct
> > > > rstCon!AptDateSet = rstAct!AptDateSet
> > > > rstCon!AptTimeSet = rstAct!AptTimeSet
> > > > rstCon!NextCall = rstAct!NextCall
> > > > rstCon!DateofNextContact = rstAct!NextCall
> > > > 'rstCon!TimeofNextCall =
> > > > rstCon!InsExDate = rstAct!InsRenewHealth
> > > > rstCon!WCExDate = rstAct!InsRenewWC
> > > > rstCon!NoEmpHealth = rstAct!NoEmpHealth
> > > > rstCon!NoEmpWC = rstAct!NoEmpWC
> > > > rstCon.Update
> > > > rstAct.MoveNext
> > > > Loop
> > > > rstCon.MoveNext
> > > > Loop
> > > > rstAct.Close
> > > > rstCon.Close
> > > > db.Close
> > > > End Sub
> > > > Thanks.
> > > > > There's no special reason it shouldn't work, provided the
recordset
> > > > objects
> > > > > are open and positioned at the appropriate records, and the field
> > names
> > > > are
> > > > > correct, and you have used the .Edit method on rsttbl1 and will
> follow
> > > it
> > > > > with the .Update method when you're done assigning values to it.
> > > > > When you say it doesn't work, what do you mean? You get an error
> > (what
> > > > > error)? The value doesn't change?
> > > > > Post more of the code and background information for a better
> > diagnosis.
> > > > > --
> > > > > Dirk Goldgar
> > > > > (remove NOSPAM from reply address)
> > > > > > How can I append the info in one memo field to another?
> > > > > > I've tried
> > > > > > rsttbl1!memofield1 = rsttbl1!memofield1 & rsttbl2!memofield2
> > > > > > appendchunk doesn't seem to work either.
> > > > > > Thanks.