Make sure table gets data from form before close

H

H0MELY

Greetings, thank you all for looking. This is probably very easy but it is
late and I am having brain problems. I built a quick "issues" form that
allows people to enter information when they encounter problems with my
databse. Hopefully it will never need to be used ;)

So I have them click a button that will always be available from the form
header. The button opens the issue form ready for a new record. The data
that is entered gets posted to a table called...tbl_issues. The issue form
has a submit button that uses the sendobject action to send me an email of
the issues table.

So the trick is that the user must complete the record and move on to a
potential new record for it to get to post to the table. My question is...I
would like to ensure that the data that is entered gets posted to the issues
table...regardless if they actually complete the form. If they click the
send button I want whatever is in the data fields to get posted to the table
and then sent to me.

I hope this is really easy for someone. Thank you all for looking and I
look forward to your responses.

-john
 
W

Wayne-I-M

If the form is bound to a table - as soon as the record is created anything
input in the controls (bound to field) will be stored in the table. You
don't need to do anything. Of course if they delete the data in the controls
then you will not save it but the record will still be saved (unless they
delete the record)

You just need to create a report (filtered that the record primary field)
and use SendObject to send this report to you in whatever format you have set.
 
B

Bob Quintal

Greetings, thank you all for looking. This is probably very easy
but it is late and I am having brain problems. I built a quick
"issues" form that allows people to enter information when they
encounter problems with my databse. Hopefully it will never need
to be used ;)

So I have them click a button that will always be available from
the form header. The button opens the issue form ready for a new
record. The data that is entered gets posted to a table
called...tbl_issues. The issue form has a submit button that uses
the sendobject action to send me an email of the issues table.

So the trick is that the user must complete the record and move on
to a potential new record for it to get to post to the table. My
question is...I would like to ensure that the data that is entered
gets posted to the issues table...regardless if they actually
complete the form. If they click the send button I want whatever
is in the data fields to get posted to the table and then sent to
me.

I hope this is really easy for someone. Thank you all for looking
and I look forward to your responses.

-john
in your send button's on click procedure, add the following lines
before your code to create the email.

If me.dirty then
me.dirty = false
end If

dirty is a property of the form that indicates that the form has
unposted data.
 

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