Expand|Select|Wrap|Line Numbers
- Private Sub stockID_AfterUpdate()
- If (Me.Dirty = True) Then
- Me.Dirty = False
- End If
- Me.current_record = Me.lineID
- Dim db As Database
- Dim floor_cost As dao.Recordset
- Dim floorSQL As String
- Dim cstockID As dao.Recordset
- Dim cslineid As Integer
- Dim update_room As String
- DoCmd.SetWarnings FalseSet db = CurrentDb
- Set cstockID = db.OpenRecordset("SELECT stockID FROM estimate_lines WHERE lineID = " & Me.current_record & " ;", dbOpenDynaset)
- MsgBox cstockID.RecordCount - debug to check record
- cstockID.MoveFirst
- cslineid = cstockID.Fields("stockID")
- floorSQL = "SELECT stockID, cost_price, sales_price " & _
- " FROM stock " & _
- " WHERE stockID = " & cslineid & " ;"
- Set floor_cost = db.OpenRecordset(floorSQL, dbOpenDynaset)
- floor_cost.MoveFirst
- ........... much more code
I simply don't understand, I have been trying different ways for nearly 4 days now.
can anyone help me please ?
Is there a running option that may control this