Show Open Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form, based on a query, based on a table for Service Calls.

I'd like to open the form and only show records that have the CompletedDate
blank...only incomplete calls.

How can I do that with a button on the switchboard? I know there should be
some simple code to just show certain records, but I can't seem to figure out
how to do it.

Thank you in advance for any help.

I hope i didn't already post this a few minutes ago...it looked like it
didn't post.
 
type in

Is Null

into the 'criteria' field of the column of the query in design view for the
CompletedDate

double check by running the query...it should now return only those records
with no date in that field
 
Perfect!
Thanks!

NetworkTrade said:
type in

Is Null

into the 'criteria' field of the column of the query in design view for the
CompletedDate

double check by running the query...it should now return only those records
with no date in that field
 
Gee,

The problem with the built-in Switchboard is that it is canned to perform
only basic operations. If you wish to continue using the switchboard, make a
copy your form and reset its RecordSource property to the name of a query
that selects records on the basis of CompletedDate = Null.

Otherwise, if you're ready to build your own menu forms, you can have a
single form and pass the name of the query to the optional Filter parameter
of the Openform method.

From Access VBA Help on the Openform method:

expression.OpenForm(FormName, View, FilterName, WhereCondition, DataMode,
WindowMode, OpenArgs)

In your case:

DoCmd.OpenForm "YourForm,,"YourQuery"

or, alternatively, using the WhereCondition,

DoCmd.OpenForm "YourForm",,,"[CompletedDate] Is Null"

Hope that helps.
Sprinks
 
Have you tried using the built in Query builder to build a query that only
returns the records you want?
 
Back
Top