Make A Query Updateable

G

Guest

I am simplifying my situation because the actual situation is very complex. A
table named TableA has a field named Num and the TableA contains many
records. A query named QueryA uses a function to calculate a set of ten
numbers beginning with a selected number. QueryA has one field named
RecordNums. Another query named QueryB includes both TableA and QueryA and
inner joins RecordNums on Num. QueryB can then return any ten records out of
TableA beginning with a selected number. The problem is that QueryB is not
updateable and I need it to be updateable so I can use it as a basis for a
form.

As an experiment I used QueryA as a Make Table query to create a table named
TableB of ten numbers. I then inner joined TableB on TableA in QueryB. QueryB
was still not updateable. Then by trial and error I made Num in TableB the
primary key which indexed the Num field. Now QueryB was updateable.

Is there a way to index a field in a query or to make it act like a primary
key in a table? In other words, is there a way to do something with Num in
QueryA so that QueryB is updateable? Using the function to generate the ten
numbers must be kept.

Thanks for any suggestions!
 
J

John Vinson

I am simplifying my situation because the actual situation is very complex. A
table named TableA has a field named Num and the TableA contains many
records. A query named QueryA uses a function to calculate a set of ten
numbers beginning with a selected number. QueryA has one field named
RecordNums. Another query named QueryB includes both TableA and QueryA and
inner joins RecordNums on Num. QueryB can then return any ten records out of
TableA beginning with a selected number. The problem is that QueryB is not
updateable and I need it to be updateable so I can use it as a basis for a
form.

As an experiment I used QueryA as a Make Table query to create a table named
TableB of ten numbers. I then inner joined TableB on TableA in QueryB. QueryB
was still not updateable. Then by trial and error I made Num in TableB the
primary key which indexed the Num field. Now QueryB was updateable.

Is there a way to index a field in a query or to make it act like a primary
key in a table? In other words, is there a way to do something with Num in
QueryA so that QueryB is updateable? Using the function to generate the ten
numbers must be kept.

No Totals query is ever updateable, if that's what you're doing.

Could you please post the SQL of the query, and/or some indication of
the nature of the function?


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