I am trying to use the where condition to assign the caption to the form I am opening through DoCmd.OpenForm triggered by command button OnClick.
This form is a template I assign 4 different record sources (you'll see in part of the code), the caption in property sheet is blank.
I would like it to show me different captions depending on the button I pushed to open
Sample code of two of the buttons I've written so far:
(I also tried Me.Caption but that didn't work)
Form is opening with proper record source, but I can't get the where to trigger
Imagine I am missing syntax?
Thank you!
This form is a template I assign 4 different record sources (you'll see in part of the code), the caption in property sheet is blank.
I would like it to show me different captions depending on the button I pushed to open
Sample code of two of the buttons I've written so far:
Code:
Private Sub cmdCO_Click()
DoCmd.OpenForm "qdffrmINVMF3713", , , Form.Caption = "Cost Open"
Forms!qdffrmINVMF3713.RecordSource = "qryISSUE1costopen"
End Sub
Private Sub cmdPP_Click()
DoCmd.OpenForm "qdffrmINVMF3713", , , Form.Caption = "Partial Payments"
Forms!qdffrmINVMF3713.RecordSource = "qryISSUE2ppfrm"
End Sub
Form is opening with proper record source, but I can't get the where to trigger
Imagine I am missing syntax?
Thank you!
Comment