hmmm ... I had always used .addnew and .edit before in my save functions with .update at the end with no problems.
Any other ideas?
For example :
Dim MyVendorEdit As Recordset
If IsNumeric(txtVendor.Text) Then
SQL = "SELECT * " _
& "FROM tblContact " _
& "WHERE tblContact.[ContactId] = " & txtVendor.Text
Set MyVendorEdit = DbsNew.OpenRecordset(SQL, dbOpenDynaset)
If Not MyVendorEdit.EOF Then
With MyVendorEdit
.Edit
If Trim(txtFirstName.Text) <> "" Then
!FirstName = txtFirstName.Text
Else
!FirstName = Null
End If
If Trim(txtLastName.Text) <> "" Then
!LastName = txtLastName.Text
Else
!LastName = Null
End If
.Update
.Close
End With
End If
end if
Just an annoying problem of why it works in other programs and not this one. I have all my references made the same as other projects where I use this so I am at a loss.
Anyone else have any suggestions as now it won't even read the SQL statement and gives : error 13 type mismatch on a simple function?
ContactID is an autonumber
Public Function chkValidNum(Num As Long) As Boolean
Dim rsCheckNum As Recordset
Dim Checker As Boolean
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.