Dlookup when yes/no box clicked

whojstall11

Registered User.
Local time
Yesterday, 23:54
Joined
Sep 7, 2011
Messages
94



I have a table (Current Meds) nested on my form that has a yes/no box (discontinue) clicked in every data entry. When i click on the yes/no box (discontinue) I want to copy data from that row and add it to a different nested table (tblNotesCurrentMeds) on that same form. I cant get it to work can anybody help my code so far.
Code:
 	Private Sub Discontinue_AfterUpdate() If Discontinue = -1 Then Initial = DLookup("Initial", "Current Meds", "IDCurrentMeds = '" & [IDCurrentMeds] & "'") Else End If End Sub


 
I do not understand you post.
I have a table (Current Meds) nested on my form

and your code is all on one line
I have reformatted your code

Code:
Private Sub Discontinue_AfterUpdate()

    If Discontinue = -1 Then
        Initial = DLookup("Initial", "Current Meds", "IDCurrentMeds = '" & [IDCurrentMeds] & "'")
    Else
    End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom