Stringy1 = InputBox("Please Enter/Scan the Cylinder Barcode Label You Wish to Deliver")
If StrPtr(Stringy1) <> 0 Then
strSQL = "SELECT * FROM [tbl_Delupdate] WHERE [Cylinder Barcode Label] = '" & Stringy1 & "' "
StrSQ3 = DLookup("[Cylinder Barcode Label]", "tbl_Delupdate", "[Cylinder Barcode Label] ='" & Stringy1 & "'")
StrSQ4 = "SELECT [D Status] From [tbl_Delupdate] WHERE [Cylinder Barcode Label] = '" & Stringy1 & "' "
If StrSQ4 <> "" Then
maxdate = DMax("[Date of D Status]", "tbl_Delupdate", "[Cylinder Barcode Label] = '" & Stringy1 & "'")
MsgBox "Barcode Number is already delivered. Please re-check and try again", vbCritical, "Barcode Number"
Else
If StrSQ4 = "" Then
Stringy2 = InputBox("The Cylinder/Cylinders Will Be Delivered For The Specified Date Below:-", "Spec Gas 2006, (DD / MM / YY)", Me!Text20 & "")
Set rs = db.OpenRecordset("SELECT * From tbl_Delupdate Where [Cylinder Barcode Label] = '" & Stringy1 & "'")
If rs![Cylinder Barcode Label] = Stringy1 Then
rs.Edit
rs![D Status] = "Delivered"
rs![Date of D Status] = Stringy2
rs![CustomerReturn/LindePickup] = Stringy3
rs.Update
MsgBox "Selected items have been marked as delivered for date " & Stringy2, vbInformation, "Items Changed Successfully"
End If
End If
End If
End If