view specific forms

  • Thread starter Thread starter Pass-the-reality
  • Start date Start date
P

Pass-the-reality

Using the wizard, I created a button on a Form ( frmViewRecords) so that at a
click of the button, I could view only those records where Text0 on
frmViewRecords and CSR of frmMainForm are the same - see code below. I need
to take the code one step further. Within frmMainForm, there is a subform
called frmOrderNumber. How do I also say but show me records were OrderBy on
frmOrderNumber is null?


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMainForm"

stLinkCriteria = "[CSR]=" & "'" & Me![Text0] & "'" _


DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Hi,

Quick questions: Is the OrderBy condition always to be that when you
open frmMainForm, regardless of how you open it? Or is it only to be used
when the button is clicked on frmViewRecords?

Clifford Bass
 
Back
Top