G
Guest
I have two databases one a copy of the other on which i have changed one
field from a type it in integer to autonumber. On the original a peice of
code works fine now on the autonumber one i am getting the message "data type
mismatch in criteria expression" i would be extreemly grateful if someone
could explain what this means, possible causes or a solution. the section of
code causing the problem follow.
Many thanks in advance.
'Member' works fine on earlier lines
Dim RNDPassVal As String
RNDPassVal = Int(Rnd() * 10000000)
DoCmd.RunSQL ("UPDATE tblPassword SET Password = '" & RNDPassVal &
"' WHERE MemberID = '" & Member & "'")
DoCmd.RunSQL ("INSERT INTO tblLog
([MemberID],[PasswordChanged],[PasswordChangedTo]) SELECT '" & Member & "',
True ,'" & RNDPassVal & "'")
MsgBox ("Your Password has now been changed please phone to recieve
new password")
field from a type it in integer to autonumber. On the original a peice of
code works fine now on the autonumber one i am getting the message "data type
mismatch in criteria expression" i would be extreemly grateful if someone
could explain what this means, possible causes or a solution. the section of
code causing the problem follow.
Many thanks in advance.
'Member' works fine on earlier lines
Dim RNDPassVal As String
RNDPassVal = Int(Rnd() * 10000000)
DoCmd.RunSQL ("UPDATE tblPassword SET Password = '" & RNDPassVal &
"' WHERE MemberID = '" & Member & "'")
DoCmd.RunSQL ("INSERT INTO tblLog
([MemberID],[PasswordChanged],[PasswordChangedTo]) SELECT '" & Member & "',
True ,'" & RNDPassVal & "'")
MsgBox ("Your Password has now been changed please phone to recieve
new password")