J
JohnLute
Thanks for sticking with me, David. You guys are great (even that Dirk guy
but let's not let his head get too big).
Here's what I've got:
Private Sub Form_AfterUpdate()
With CurrentDb
' Delete the old destination, if it existed.
If Len(mstrOldDestinations) > 0 Then
.Execute _
"DELETE * FROM tblLocationsDestinations " & _
"WHERE LocationsDestinations=" & Me!numLocationAddressID & _
" AND numLocationAddressID=" & mstrOldDestinations = Chr(34)
& Me.cbLocationsDestinations.OldValue & Chr(34)
End If
' Create a reciprocal record to match the record being saved.
.Execute _
"INSERT INTO tblLocationsDestinations " & _
"(LocationsDestinations, numLocationAddressID) " & _
"VALUES (" & Me!numLocationAddressID & ", " & _
Me.cbLocationsDestinations & ")", _
dbFailOnError
End With
mstrOldDestinations = vbNullString
End Sub
This returns Error 3078 Cannot find the input table or query 'False'. The
help says to check for missing underscores. The debugger points to the line:
mstrOldDestinations = Chr(34) & Me.cbLocationsDestinations.OldValue & Chr(34)
I haven't a clue as to how to remedy that!
The DAO reference is there but it doesn't appear that this error has
anything to do with that...?
but let's not let his head get too big).
Here's what I've got:
Private Sub Form_AfterUpdate()
With CurrentDb
' Delete the old destination, if it existed.
If Len(mstrOldDestinations) > 0 Then
.Execute _
"DELETE * FROM tblLocationsDestinations " & _
"WHERE LocationsDestinations=" & Me!numLocationAddressID & _
" AND numLocationAddressID=" & mstrOldDestinations = Chr(34)
& Me.cbLocationsDestinations.OldValue & Chr(34)
End If
' Create a reciprocal record to match the record being saved.
.Execute _
"INSERT INTO tblLocationsDestinations " & _
"(LocationsDestinations, numLocationAddressID) " & _
"VALUES (" & Me!numLocationAddressID & ", " & _
Me.cbLocationsDestinations & ")", _
dbFailOnError
End With
mstrOldDestinations = vbNullString
End Sub
This returns Error 3078 Cannot find the input table or query 'False'. The
help says to check for missing underscores. The debugger points to the line:
mstrOldDestinations = Chr(34) & Me.cbLocationsDestinations.OldValue & Chr(34)
I haven't a clue as to how to remedy that!
The DAO reference is there but it doesn't appear that this error has
anything to do with that...?