integritycare
Technical User
Hi all,
Just a quick request please. How do you reference an option group on a mainform to a subform. I have enclosed the code of the option group on the mainform;
The subform name is "DocManagement"
Many thanks
Integrity
Just a quick request please. How do you reference an option group on a mainform to a subform. I have enclosed the code of the option group on the mainform;
Code:
Option Compare Database
Option Explicit
Const SQL = "tblDocumentManagement.DocNo,tblDocumentManagement.RevNo,tblDocumentManagement.Group,tblDocumentManagement.Title,tblDocumentManagement.FileLoc,tblDocumentManagement.IssueReview,tblDocumentManagement.NextDate"
Private Sub optFilterBy_AfterUpdate()
Dim FilterSQL As String
Select Case Me!optFilterBy
Case 1
FilterSQL = SQL & " Where [Group] = 'Admin';"
Case 2
FilterSQL = SQL & " Where [Group] = 'Agenda';"
Case 3
FilterSQL = SQL & " Where [Group] = 'Contract';"
Case 4
FilterSQL = SQL & " Where [Group] = 'CLS';"
Case 5
FilterSQL = SQL & " Where [Group] = 'CV';"
Case 6
FilterSQL = SQL & " Where [Group] = 'Empl';"
Case Else
FilterSQL = SQL & ";"
End Select
Me.RecordSource = FilterSQL
Me.Requery
End Sub
The subform name is "DocManagement"
Many thanks
Integrity