Well, it appears that Lines 9-26 are trying to add a new client, even if there is an exisiting client.
So, from a trouble shooter's perspective, we have to figure out why it it doing that. Let's add a few lines of code to help us out here (you can always delete this code later on).
Add this code between lines 8 and 9:
Now, when you run the code, what the the pop up tell you the values are and, more importantly, how do they differ from the values input into the form?
I am causing the code to exit before any records are added, because we just want to test the values the code comes up with.
Yes, we are taking this truly at one step at a time.
So, from a trouble shooter's perspective, we have to figure out why it it doing that. Let's add a few lines of code to help us out here (you can always delete this code later on).
Add this code between lines 8 and 9:
Code:
Dim strFirstTest As String
Dim strLastTest As String
Dim dtDOBTest as Date
strFirstTest = Me("First Name")
strLastTest = Me("Last Name")
dtDOBTest = Me.DOB
MsgBox "Here are your values:" & vbCrLf & vbCrLf & _
"First: " & strFirstTest & vbCrLf & _
"Last: " & strLastTest & vbCrLf & _
"DOB: " & dtDOBTest, vbOkOnly
Exit Sub
I am causing the code to exit before any records are added, because we just want to test the values the code comes up with.
Yes, we are taking this truly at one step at a time.
Comment