Append record based on form field answer.

G

Guest

I have a subform (detail) that contains due dates and completed dates for a
series of tasks. The detail record has the following fields: detailkey (not
an autokey), due_date, completed_date, and reviewer.
I want to write a macro or SQL command that will do the following:

When completed_date field is filled in, ask the user if he wants to append
new record? If no...do nothing; if yes, append a new record to the Detail
with the same
detailkey, the due_date+1 year, null completed_date and reviewer.. Thats it.

I wrote a query to append a record but it does it to all records, not just
the current one with focus. I hope this is clear.

Thanks for any ideas.

Dean
 
S

Steve Schapel

Dean,

If I understand you correctly, you have done it, except that the Append
Query should have a criteria in the detailkey column referencing the
current record in the subform, i.e. using syntax such as...
[Forms]![NameOfMainForm]![Detail]![detailkey]
 

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