Hello everyone, I put in a mask (by copying from the internet) a code that allows you to search within the pc to upload a photo in a record. Within the table for each record corresponds to a picture. This all works
My problem is that if I replace the photo, you see the new uploaded photo if I leave the form open. I searched the internet and found the function Me.Requery and Me.refresh but both do not work in my case.
We carry the code
On Error GoTo cmdAddSmall_Err
Dim strFilter As String
As Long Dim lngflags
As Variant Dim varFileName
strFilter = "All Files (*. *)" & vbNullChar & "*. *" _
& VbNullChar & "All Files (*. *)" & VbNullChar & "*. *"
lngflags = tscFNPathMustExist Or tscFNFileMustExist _
or tscFNHideReadOnly
varFileName tsGetFileFromUser = (_
fOpenFile: = True, _
strFilter: = strFilter, _
rlngflags: = lngflags, _
strDialogTitle: = "Please choose a file ...")
If IsNull (varFileName) Then
else
Me! [Percorso_foto_front2] = varFileName
end If
cmdAddSmall_End:
On Error GoTo 0
Exit Sub
cmdAddSmall_Err:
Beep
MsgBox Err.Description,, "Error:" & Err.Number _
& "In file"
Resume cmdAddSmall_End
Me.Requery