View Single Post
  #6 (permalink)  
Old 07-03-09, 22:53
Bob2119 Bob2119 is offline
Registered User
 
Join Date: Jul 2009
Posts: 181
I got it working needed [] and I add a i,s,d before every field name and each description name are all different. One line of code.
[battery.ibtotal cycles] = [battery.ibtotal cycles] + 1

Here is what a friend said I needed to start with I have no idea what it is

Private Sub Battery___Change()
Dim con As Object
Dim rs As Object
Dim stSql As String
Dim intOption As Integer

Set con = Application.CurrentProject.Connection
stSql = "SELECT * FROM [Battery] where ID =" & Battery__.Text
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 3, 3
rs("Total Cycles #") = rs("Total Cycles #") + 1
Cycles = rs("Total Cycles #")
rs.Update
rs.Close
End Sub
Reply With Quote