CurrentDb.Execute "UPDATE Goods SET Goods.Print = True WHERE (((Goods.Good_ID)=КАК СЮДА ВСТАВИТЬ ИМЯ Ф-ЛА БЕЗ РАСШИРЕНИЯ))"
Dim FN As String Set FS = Application.FileSearch With FS .LookIn = "C:\db\Photo" .FileName = "*.jpg" If .Execute > 0 Then For i = 1 To .FoundFiles.Count FN = .FoundFiles(i) CurrentDb.Execute "UPDATE Goods SET Goods.Print = True WHERE (((Goods.Good_ID)=КАК СЮДА ВСТАВИТЬ ИМЯ Ф-ЛА БЕЗ РАСШИРЕНИЯ))" 'MsgBox .FoundFiles(i) Next i Else MsgBox "Íóæíî ðàçìåñòèòü ôîòîãðàôèè â ïàïêå Photo" End If End With
FN = .FoundFiles(i) = C:\db\Photo\3643.jpg
3643
FNS = Mid(FN, InStrRev(FN, "\") + 1, 4)
CurrentDb.Execute "UPDATE Goods SET Goods.Print = True WHERE (((Goods.Good_ID)=FNS))"
CurrentDb.Execute "UPDATE Goods SET Print = True WHERE Good_ID='" & FNS & "'"
CurrentDb.Execute "UPDATE Goods SET Goods.Print = True WHERE (((Goods.Good_ID)=" & FNS & "))"