Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skip first record in a "Like" query

Status
Not open for further replies.

briansmithdanisco

IS-IT--Management
Jun 13, 2007
19
US
Hi All,

I am using Access 2003 and I have a query that uses the Like operator. The table I am searching is a vendor table. A "master" vendor can have several sub-vendor. If the master ID is 999 it could have a sub 999-a, 999-b and so on. The master vendor ID's are assigned from an external system. The sub-vendors are not assigned so I thought to keep everything in the same table I could add a suffix to the sub-vendors so it would be easy to do searches on master/sub combinations using the like operator.

I have the master displayed on a form, and I have a sub-form listing all the subs with the "Like" query as its record source. The problem is I don't want the master to be displayed in the sub-vendor subform. The query that uses the like operator also pulls the Master vendor as the result set. The query is sorted so the master is always the first record displayed.

My question: is there a way to remove the first record (the master) from the result set of the query that loads the sub-form?

Would it be better just to split the master and sub-vendors into two tables and have a the master ID be a key on the sub-vendor table?

Thanks in advance.
 
Add the '-' to the like criteria (I'm assuming that the master does not have the dash).

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Thanks traingamer. I don't know why I did not think of changing the like to include the "-". It works fine now. I guess I was thinking of a way to just drop the record rather than filter it out with the criteria.

Thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top