Update table with incremental (1 Viewer)

Onlylonely

Registered User.
Local time
Today, 21:12
Joined
Jan 18, 2017
Messages
43
Hi Guys,

Any clue to update the table with incremental number?

Code:
With rst

Do Until .EOF

If (![Remark] = "Rework") Then
Rework = Rework + 1
Else

End If
.MoveNext
Loop
End With

For R = 1 To 19

CurrentDb.Execute "INSERT INTO Issuetbl (Part_Number, Serial_Number, Job_Number , Step, Character_ID, Remark) " & _
" VALUES ('" & Me.txtPN & "','" & Me.txtSN & " ','" & Me.txtJN & "', '1' , " & R & " , 'Rework'  )"

Next

Call Load_update_Step1
 

Attachments

  • table.JPG
    table.JPG
    32 KB · Views: 91

June7

AWF VIP
Local time
Today, 05:12
Joined
Mar 9, 2014
Messages
5,466
You want to increment groups of 3 records? Why iterate 19 times?
 

Minty

AWF VIP
Local time
Today, 14:12
Joined
Jul 26, 2013
Messages
10,368
PMFJI - this is the second thread I've read where you seem very focused on keeping "Status" type information updated in tables.

Ideally you should calculate this type of information based on other data, as trying to keep it updated at all touch points in your database becomes very difficult, as you are discovering.

On this question you appear to be running an Insert query but are describing performing an Update?
 

Users who are viewing this thread

Top Bottom