Displaying Data in Form w/Field Selection Criteria

  • Thread starter Thread starter JK
  • Start date Start date
J

JK

I have a form that is a replica from the Northwind db; the Customer Phone
List. I have thousands of accounts in my database. Closed accounts (no longer
buying,) are specified with four (*'s) in the account name. For example,
account name****.

I want to prevent these accounts from appearing in my Phone List. Maybe even
add a check box to the form header to either display the closed accounts or
not.

Any help you could provide would be greatly appreciated.
 
JK said:
I have a form that is a replica from the Northwind db; the Customer Phone
List. I have thousands of accounts in my database. Closed accounts (no longer
buying,) are specified with four (*'s) in the account name. For example,
account name****.

I want to prevent these accounts from appearing in my Phone List. Maybe even
add a check box to the form header to either display the closed accounts or
not.


Sounds like you should change the form's record source to a
query that has the account name field's criteria set to
<>"****"
 
You need criteria in a query to filter out the records you don't want to
see.

WHERE AccountName NOT LIKE "*[*][*][*][*]"

OR you could use

WHERE Right(AccountName,4) <> "****"

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
The four stars are actually part of the account name. This is our wonderful
system for marking accounts as inactive (JD Edwards.)

Example Customer Name: "A & A GOURMET DELI **** "
I just did a copy and paste.

Is this possible without going crazy?
 
JK said:
The four stars are actually part of the account name. This is our wonderful
system for marking accounts as inactive (JD Edwards.)

Example Customer Name: "A & A GOURMET DELI **** "
I just did a copy and paste.


Then use John's first suggestion.

That is a "stupid" way to make an entry inactive. Far
better would be to add a field to the table and bind it to a
check box on a form. OTOH, if historical information might
be useful, I would use a date field to indicate when the
account became inactive and a Null value would indicate the
the account is still active.
 
Back
Top