The .Text
property is only available for the control which currently has focus. When you attempt to reference .Text
on any other control, you will trigger an error. The .Value
property is available whether or not the control has focus.
To be safe, change them all to .Value
.
Me.RR_ID.Value = rs!RR_ID
Me.HR_ID.Value = rs!HR_ID
Me.Room_No.Value = rs![Room No]
Me.No_of_Beds.Value = rs!No_of_Beds
Me.Room_Category.Value = rs!Room_Category