If there is no photo, the control is still there and occupies space and will therefore be a big white space. Use a substitute image of text: Image Unavailable or conditionally show a textbox or label with that notation.
Why is subform container linking on IDMe109inBoB fields, which don't exist?
Example code for custom navigation buttons:
Code:
Private Sub btnNext_Click()
Me.btnViewLabData.SetFocus
Call ViewData("Next")
End Sub
Private Sub btnPrevious_Click()
Me.btnViewLabData.SetFocus
Call ViewData("Previous")
End Sub
Private Sub btnQuit_Click()
Call ViewData("Quit")
End Sub
Public Sub ViewData(strDirection)
'called by form to navigate records
With Form_SampleInfo
.RecordsetClone.Bookmark = .Bookmark
Select Case strDirection
Case "Quit"
DoCmd.Close acForm, "SampleInfo", acSaveNo
Case "Next"
.RecordsetClone.MoveNext
If Not .RecordsetClone.EOF Then
DoCmd.GoToRecord acForm, "SampleInfo", acNext
Else
.RecordsetClone.MoveLast
MsgBox "Last record."
.btnNext.Enabled = False
End If
.btnPrevious.Enabled = True
Case "Previous"
.RecordsetClone.MovePrevious
If Not .RecordsetClone.BOF Then
DoCmd.GoToRecord acForm, "SampleInfo", acPrevious
Else
.RecordsetClone.MoveFirst
MsgBox "First record."
.btnPrevious.Enabled = False
End If
.btnNext.Enabled = True
End Select
End With
End Sub