lngFolderID = Forms!frmSeriesFolderList.lstFolder.Column(0)
Where lngFolderID is a long variable for the folder index number, which is in the first column of the list box.
However if that is the code I use and then try to open frmFolderData from frmEADFolders I will get an error because frmSeriesFolderList is not open. I need to test for whether or not the form I want is open, or in this case, which of the two forms I could use is open. To do that I use the IsLoaded property.
Here is the code used in frmFolderData to decide whether to pull the needed data from frmSeriesFolderData or frmEADFolders:
If CurrentProject.AllForms("frmSeriesFolderList").IsLoaded Then
lngFolderID = Forms!frmSeriesFolderList.lstFolder.Column(0)
ElseIf CurrentProject.AllForms("frmEADFolders").IsLoaded Then
lngFolderID = Forms!frmEADFolders.lstFolders.Column(0)
End If