Re: Create Reciprocal Record via After Update - for Dirk Goldgar o
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Nov 2007 17:25:05 -0500
"JohnLute" <JohnLute@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:678B147E-CF1E-4349-A70D-A03BBC8E969B@xxxxxxxxxxxxxxxx
So, what are the data types of the fields
LocationsDestinations and numLocationAddressID?
They're both numeric (Long Integer). I bet Mr. Steele has hit on the
answer...?
Close, but I think he assumed only one of them was numeric. Try this:
If Len(mstrOldDestinations) > 0 Then
.Execute _
"DELETE * FROM tblLocationsDestinations " & _
"WHERE LocationsDestinations=" & Me!numLocationAddressID & _
" AND numLocationAddressID=" & mstrOldDestinations, _
dbFailOnError
End If
' Create a reciprocal record to match the record being saved.
.Execute _
"INSERT INTO tblLocationsDestinations " & _
"(LocationsDestinations, numLocationAddressID) " & _
"VALUES (" & Me!numLocationAddressID & ", " & _
Me.cbLocationsDestinations & ")", _
dbFailOnError
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- References:
- Re: Create Reciprocal Record via After Update - for Dirk Goldgar or ot
- From: Dirk Goldgar
- Re: Create Reciprocal Record via After Update - for Dirk Goldgar or ot
- Prev by Date: 2 Part Question
- Next by Date: Re: Why does this code not work?
- Previous by thread: Re: Create Reciprocal Record via After Update - for Dirk Goldgar or ot
- Next by thread: Re: Create Reciprocal Record via After Update - for Dirk Goldgar o
- Index(es):
Relevant Pages
|