to: Photograph1.Image = Image.FromStream(New IO.MemoryStream(arr))
FromStream is a shared method on the Image class. The IDE does not like you accessing a shared method/field/property on an instance eventhough as it works as you have found out. In this case, the instance is the Image property on Photograph (assuming Photograph is a PictureBox).
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...