C
Chris
I "borrowed" this code from another form in my db, which works.
stlinkCriteria = "[ClientID]=" & "'" & Me![ClientID] & "'"
If HasData12(ClientID) Then
DoCmd.OpenForm stDocName, , , stlinkCriteria
Else
Dim NewData As String
NewData = Me.ClientID
If Me.Dirty Then Me.Dirty = False
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
End If
I wish to determine if there is a record and then, absent one, add a new
record. Testing for the record works fine -- adding does not.
Can anyone see what I cannot?
stlinkCriteria = "[ClientID]=" & "'" & Me![ClientID] & "'"
If HasData12(ClientID) Then
DoCmd.OpenForm stDocName, , , stlinkCriteria
Else
Dim NewData As String
NewData = Me.ClientID
If Me.Dirty Then Me.Dirty = False
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
End If
I wish to determine if there is a record and then, absent one, add a new
record. Testing for the record works fine -- adding does not.
Can anyone see what I cannot?