View Full Version : IF statement from Table Field


joeserrone
05-08-2008, 06:13 AM
Hello Everyone,
I have a table called EARNS_Data_tbl in this table I have 2 fields called RCheckAmt and RecLock
I need for to create a button on a form that when is pressed it will search for dollar amounts in RCheckAmt of $ 2,000.00 or less and place the RecLock checkbox to True.

I also want to show the user in a message box how many records have been updated by running this.

Something similar to this:

If RCheckAmt <= 2000 Then
RecLock = True
End If
End Sub

odin1701
05-08-2008, 06:24 AM
If you did a simple update query, it would show how many records are being updated. I don't know if that would work the best depending on how computer savvy your users are.

Otherwise, you can use a recordset and the RecordCount property.

joeserrone
05-08-2008, 06:53 AM
Thanks for the quick replay, yes doing an append query won't be an issue at all. However I was trying to give it a more custom look instead of using the default messages of Access when appending the records. That's why I was leaning move on VBA if it can be done