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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Queries 1

Status
Not open for further replies.

janetlyn

Technical User
Jan 29, 2003
516
US
I have a table &quot;MainTable&quot; with [Project#] as the primary key. Another table is &quot;Ins&quot; with [Project#] as the primary key. There should be one record in the &quot;Ins&quot; table for each record in the &quot;MainTable&quot;. One of the maintenance items in my program is for someone to push a button and it runs a query, shows a report that identifies those records in &quot;MainTable&quot; that are not in the &quot;Ins&quot; table so I can then add those records as needed. Now the problem: Before the company began we identified previous projects with a [Project#] of A1, A2, E1, E2, etc. Now all are numbers are 98-01; 99-03; 00-01; 01-03, etc. The old record starting with alpha are not needed in the &quot;Ins&quot; table and it would be silly to put them in the table just to solve my problem. Right now my query takes &quot;MainTable.Project#&quot; and sees if &quot;Ins.Project#&quot; Is Null. This shows about 4 records starting with numbers and all my records starting with alpha. I added onto Is Null to say &quot;Is Null AND <A&quot; but then it does not give me any records at all. If I just put in <A it gives me all projects beginning with numbers.

How do I write the correct AND statement please? Appreciate any help I can get. Janet Lyn
 
in the criteria for table INS, put

is null

for the criteria of the Project# for MAIN TABLE, put

<&quot;A&quot;
 
Ya know, sometimes it is so simple you just want to hit a brick wall with your head. Thanks so much. Worked like a charm. Star to ya. Janet Lyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top