Adding data in Queries

  • Thread starter Quinto via AccessMonster.com
  • Start date
Q

Quinto via AccessMonster.com

I am at loss.
I created a query from 2 tables. Tables have some common field names. I
joined the date field and a BlockT field. I have entered some criteria to
limit the data dispaly for one date and now I cannot update the data. Why not?

These tables are propagated by 2 uppend queries and have a unique field to
prevent duplicate records [Date]&[ID]&[StartTime]&[BlockT] These are not the
fields that I want to enter data.

Thanks in advance for any help.

Charles
 
J

John W. Vinson

I am at loss.
I created a query from 2 tables. Tables have some common field names. I
joined the date field and a BlockT field. I have entered some criteria to
limit the data dispaly for one date and now I cannot update the data. Why not?

These tables are propagated by 2 uppend queries and have a unique field to
prevent duplicate records [Date]&[ID]&[StartTime]&[BlockT] These are not the
fields that I want to enter data.

Thanks in advance for any help.

Charles

A query joining two tables will be updateable only if there is a unique Index
(such as a Primary Key) on the "one" side table; I believe that you also need
a relationship defined between the tables. Perhaps you could post the SQL of
the query and indicate what the Primary Key of each table is, and any defined
indexes.

It is neither necessary nor a good idea to create a redundant concatenation of
fields to define uniqueness. You can create a Primary Key on up to TEN fields;
ctrl-click the fields in table design view so they are selected and click the
key icon. Or (probably better) you can use an Autonumber as the primary key
and create a unique index on the four fields using the indexes tool - put an
index name in the left column, check the unique checkbox, and put the four
fieldnames in that row and the three succeeding rows in the right column.

Note that Date is a reserved word (for the builtin Date() today's date
function) and is NOT a good choice of fieldname; Access can and will get
confused.

John W. Vinson [MVP]
 

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