View Specific Records within a form

P

Pass-the-reality

Using the Wizard, I created a button on my form (frmSearch) that will open my
main form (frmMainForm) and only show me those records where the text2 field
on frmSearch equals the CSR field on frmMain. How do I add to this code (see
below) to then say of those records, only show me the records where both
fields QABy and OrderBy on the frmMainForm are null.

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMainForm"

stLinkCriteria = "[CSR]=" & "'" & Me![Text2] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
D

Dale Fye

Try:

stLinkCriteria = "[CSR]=" & "'" & Me![Text2] & "'" _
& " AND [QABy] IS NULL " _
& " AND [OrderBy] IS NULL"

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

view specific forms 1
Subform 0
Command Button 0
Code to open a query 2
transfer a field using button 1
search command 2
Listbox to open a form (primary key text) 2
Code Only works first time! 2

Top