MajP
You've got your good things, and you've got mine.
- Local time
 - Today, 04:58
 
- Joined
 - May 21, 2018
 
- Messages
 - 9,951
 
If you wanted to you could write the student name in the bed.
		
		
	
	
		
	
	
	
	
		
 
		Code:
	
	
	  Dim rs As DAO.Recordset
  Dim I As Integer
 
 
  For I = 1 To 5
    With Me.Controls("lbl" & I)
      .BackColor = vbGreen
      .Caption = .Tag
    End With
  Next I
  DoEvents
  Set rs = Me.qryAssignments_subform.Form.RecordsetClone
  If Not (rs.EOF And rs.BOF) Then rs.MoveFirst
  Do While Not rs.EOF
    With Me.Controls("lbl" & rs!bed)
      .BackColor = vbRed
      .Caption = .Tag & vbCrLf & rs![student name]
    End With
   rs.MoveNext
  Loop
  Me.Repaint