Please help

T

TBird

I have a long primary key, and it's divided into several sub-units (like
a social security number). However, only the last 4 digits are unique,
how can I limit my search in a query to just the last 4?
 
J

jamiec

best way to solve this...

in the query definition, create a calculated field defined as the right 4 digits of the primary key...
NewField: right([primary_key],4)
and then set your constraint on this new calculated field instead of the original primary key field.
 
J

John Vinson

I have a long primary key, and it's divided into several sub-units (like
a social security number). However, only the last 4 digits are unique,
how can I limit my search in a query to just the last 4?

Divide it into several fields, and make the 4-digit final one the
Primary Key. If it's unique, it'll be a better key!

Concatenate the separate fields for display purposes, in a Query or in
the control source of a form or report field.
 

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