integritycare
Technical User
Hello,
I have a question on using option groups. I understand the building of them, etc but here is my question.
The scenario is on an invoice form. The invoice form is as normal using a query to gets is information.
However I wanted to use the same invoice form to view archived invoice data.
I know that if I was to put the invoice form on a separate form so that it became a sub form I could use an option group on that mainform to select between "current" and "archived data" by using the this code
What my question is, can the option group be put on the original invoice form so that the selection could be as in the code above.
Many thanks,
Integrity
I have a question on using option groups. I understand the building of them, etc but here is my question.
The scenario is on an invoice form. The invoice form is as normal using a query to gets is information.
However I wanted to use the same invoice form to view archived invoice data.
I know that if I was to put the invoice form on a separate form so that it became a sub form I could use an option group on that mainform to select between "current" and "archived data" by using the this code
Code:
Private Sub PanelSelector_AfterUpdate()
On Error GoTo PanelSelector_AfterUpdate_error
Select Case Me![PanelSelector]
Case 1 'Current
Me![Accounts].Form.RecordSource = "qryInvoices"
Case 2 'Archives
Me![Accounts].Form.RecordSource = "qryInvoices-Arch"
End Select
PanelSelector_AfterUpdate_Exit:
Exit Sub
PanelSelector_AfterUpdate_error:
Select Case Err
Case Else
MsgBox Err & "-" & Error$, vbCritical + vbOKOnly, "Error in module PanelSelector_AfterUpdate"
Resume PanelSelector_AfterUpdate_Exit
End Select
End Sub
What my question is, can the option group be put on the original invoice form so that the selection could be as in the code above.
Many thanks,
Integrity