Write code

J

Jerry

Can someone help me write code that will copy a field
from records of a query to a table through the use of
Dlookup or some other function. I have a query linked to
a table that is bound to a form which updates and
calculates the query. I can use dlookup in the forms
after update event but it conflicts with the before
update so I thought a global procedure would work better
after the form closes. Any thoughts or suggestions would
be greatly appreciated.

Jerry
 
E

Eddy

I don't quite understand the use of DLookup function in a form. In general,
you can link to a table/query with a combobox/listbox object, or a record
with the form. I think your problems lie on the design of your form. Give
us more details of your form ...
 
T

Tim Ferguson

code that will copy a field
from records of a query to a table

In general, this is not something you would want to do. If a data item
exists in a record somewhere already then you would not want to copy it,
for the usual obvious reasons. Just leave it where it is and use a joined
query when you need to see it.

There is a slightly different situation when you need to "freeze" data; for
example taking a year-end picture of data that will continue to be updated
in the new year. This is one of the few valid reasons for a make-table
query.

If you feel the need to copy stuff from one table to another on a regular
basis, though, you probably have a Design Problem.

Hope that helps


Tim F
 

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