Hi All,
Being a newbie to VB, I'm not sure this is the right area for this post, but I'm putting it out there anyway.
I have a REMOVE command button that removes a record from a table when clicked. What is supposed to happen is that when the button is clicked, the record gets removed from one table and pupt into another table (on the off chance that it may get used again). this part works, but when the record is not deleted from the first table. I get a run-time error #3464 (whatever this means): Data type mismatch in criteria expression. Here's the code:
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM tblType_ID WHERE ID = '" & Me.fldID & "'"
DoCmd.SetWarnings True
Here's the kicker, if I change the ID field to text, the code works; however, due to my customer's needs, this field must stay as Number/Long Integer.
Is there a way to make this work? I'm using Access97.
Thanks in advance.
Being a newbie to VB, I'm not sure this is the right area for this post, but I'm putting it out there anyway.
I have a REMOVE command button that removes a record from a table when clicked. What is supposed to happen is that when the button is clicked, the record gets removed from one table and pupt into another table (on the off chance that it may get used again). this part works, but when the record is not deleted from the first table. I get a run-time error #3464 (whatever this means): Data type mismatch in criteria expression. Here's the code:
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM tblType_ID WHERE ID = '" & Me.fldID & "'"
DoCmd.SetWarnings True
Here's the kicker, if I change the ID field to text, the code works; however, due to my customer's needs, this field must stay as Number/Long Integer.
Is there a way to make this work? I'm using Access97.
Thanks in advance.