Can't Add New Records

N

Nigel

I've got a table downloaded from a company's MRP system but I need to have a
3 letter code to identify the company which is the first 3 characters from
the company name field. I created a query and used the Left function to
create this. However, when I tried then to create another query based upon
the query to give me the 3 character code, and another query which gives me
comapny deatils, it will not allow me to add any more records, the add new
record button is greyed out.

Any help appreiated.

Thanks
 
O

Ofer Cohen

Open the query in design view, change the UniqueRecords of the query to Yes.

Or, add to the SQL Distinct

Select Distinct TableNAme.Field1 , TableNAme.Field2 From TableName
=================

If that doesnt work, you might need to change the SQL
Instead of Inner Join try something like

Select * From Table1 Where FieldNAme In (Select Field1 From Table2)
 
N

Nigel

Hi Ofer

Thanks for your reply, but changing the properties did not work. Not knowing
SQL, where would I place the SQL Distinct or your other suggestion. If you
haven't already guessed, I'm bit of a novice!

Thanks
 
N

Nigel

SQl as follows:

SELECT DISTINCTROW qryDBO1.Code, qryCL.CUSTOMER, qryDBO1.StartDate,
qryDBO1.NeededDate
FROM qryCL INNER JOIN qryDBO1 ON qryCL.ITEM_PREFIX = qryDBO1.Code;
 
N

Nigel

Not sure if the last post went, so ...

SELECT DISTINCTROW qryDBO1.Code, qryCL.CUSTOMER, qryDBO1.StartDate,
qryDBO1.NeededDate
FROM qryCL INNER JOIN qryDBO1 ON qryCL.ITEM_PREFIX = qryDBO1.Code;
 
O

Ofer Cohen

Sorry for the delay,

Try something like

SELECT qryDBO1.*
FROM qryDBO1 Where Code In (Select qryCL.ITEM_PREFIX From qryCL)
 
N

Nigel

Thanks Ofer, just what I wanted!

Ofer Cohen said:
Sorry for the delay,

Try something like

SELECT qryDBO1.*
FROM qryDBO1 Where Code In (Select qryCL.ITEM_PREFIX From qryCL)
 

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