I think I stated how I wanted this to work. I have a macro on another form if you click it by the Tracking Log ID number it opens to that record in the current form. So I tried converting it to use in on the after update event to see it would work that way. I just want to be able to automate my data entry. When I converted the marco and add it to the event its giving me an error
message "missing opertor in query expession {id] =1.
Private Sub Assigned_To_AfterUpdate()
If Me.cboTask = ("Reserve for Replacement") Then
DoCmd.OpenForm "Reserve for Replacement Details", acNormal, "", "[Tracking Log ID]=" & Nz([Tracking Log ID], 0), , acDialog
If (Not IsNull([Tracking Log ID])) Then
TempVars.Add "CurrentID", "[Tracking Log ID]"
End If
If (IsNull(ID)) Then
TempVars.Add "CurrentID", "Nz(DMax(""[Tracking Log ID]"",[Form].[RecordSource]),0)"
End If
DoCmd.Requery ""
DoCmd.SearchForRecord , "", acFirst, "[Tracking Log ID]=" & TempVars!CurrentID
TempVars.Remove "CurrentID"
End If
any help would be greatly appreactated.
Keri