View Single Post
  #4 (permalink)  
Old 07-03-09, 15:08
Bob2119 Bob2119 is offline
Registered User
 
Join Date: Jul 2009
Posts: 181
Question

I think I found the right place for the code. After searching the net for samples I have tried the following. But of course this don't work.
I did get "voltage = 10" to work but not "cycle = 10" for some reason. Is there a different syntax for a string field vs a number field.
No one in my town has a book on Access.

I sure would appreciate the help.

Private Sub Cycle_BeforeUpdate(Cancel As Integer)
'Ensure right battery record
SELECT Battery.ID, Battery.Description FROM Battery;
'Calc new cycle number
Cycle = battery.Cycle + 1
'Updata battery total cycle
battery.Cycle = Cycle
'
End Sub
Reply With Quote