K
kmhnhsuk
I have a problem refreshing a combo box on a form that is in edit mode.
I have a SiteNamecombo and a RoomNamecombo. I want the RoomNamecombo to
refresh if a new value is selected in the RoomNamecombo.
The code that I have is as follows:
SiteNamecombo:
Rowsource = SELECT [tblSite].[SiteName] FROM [tblSite]
SiteNamecombo After Update Event Code:
Private Sub SiteNamecombo_AfterUpdate()
Me.RoomNamecombo = Null
Me![RoomNamecombo].Requery
End Sub
RoomNamecombo
Rowsource = SELECT [tblLinkSite&Room].[RoomName] FROM [tblLinkSite&Room]
WHERE [tblLinkSite&Room].[SiteName] =
Forms![frmEquipmentAssessmentEdit]!SiteNamecombo
This works fine for a form in Add mode but not for a form in Edit mode, when
selecting from the RoomNamecombo there are no values to select.
I have a SiteNamecombo and a RoomNamecombo. I want the RoomNamecombo to
refresh if a new value is selected in the RoomNamecombo.
The code that I have is as follows:
SiteNamecombo:
Rowsource = SELECT [tblSite].[SiteName] FROM [tblSite]
SiteNamecombo After Update Event Code:
Private Sub SiteNamecombo_AfterUpdate()
Me.RoomNamecombo = Null
Me![RoomNamecombo].Requery
End Sub
RoomNamecombo
Rowsource = SELECT [tblLinkSite&Room].[RoomName] FROM [tblLinkSite&Room]
WHERE [tblLinkSite&Room].[SiteName] =
Forms![frmEquipmentAssessmentEdit]!SiteNamecombo
This works fine for a form in Add mode but not for a form in Edit mode, when
selecting from the RoomNamecombo there are no values to select.