Displaying Data in Form w/Field Selection Criteria

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.
 
M

Marshall Barton

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
<>"****"
 
J

John Spencer

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
..
 
J

JK

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?
 
M

Marshall Barton

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.
 

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

Top