Which event to use update/append?

G

Guest

I have a form bound to a table each record based on a [Registerdate].

An unbound text box [RegisterDate] on the form with form calendar to insert
date into this text box.

Once the date is inserted into the text box, I want to move this date
creating a new record in the table the form is based upon.

Which event on the text box can I use to trigger a DoCmd.RunSQL statement
that will append this date to my table creating a new record?

Better yet, can I have a combo box listing the [RegisterDates] from this
table so I can choose which record to pull up and if so, I would like to have
the ability to add a new [RegisterDate]/record in the manner described above?

Thanks for your ideas and help
 
A

Alex Dybenko

Hi,
if you enter date in calendar form - then you have to use it event; you can
make a public method in main form class module, say UpdateRegisterDate, and
then call it from your calendar form after user select date:

Forms("MainForm").UpdateRegisterDate datSelected

where datSelected is date selected in calendar

in UpdateRegisterDate you can set RegisterDate to datSelected and then run
DoCmd.RunSQL statement

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
 
G

Guest

Thank you for the suggestion, thinking this was a dead post without answers I
worked on a different approach and came up with a new problem which I just
posted under "Form Refresh Problem".

Alex Dybenko said:
Hi,
if you enter date in calendar form - then you have to use it event; you can
make a public method in main form class module, say UpdateRegisterDate, and
then call it from your calendar form after user select date:

Forms("MainForm").UpdateRegisterDate datSelected

where datSelected is date selected in calendar

in UpdateRegisterDate you can set RegisterDate to datSelected and then run
DoCmd.RunSQL statement

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jeff C said:
I have a form bound to a table each record based on a [Registerdate].

An unbound text box [RegisterDate] on the form with form calendar to
insert
date into this text box.

Once the date is inserted into the text box, I want to move this date
creating a new record in the table the form is based upon.

Which event on the text box can I use to trigger a DoCmd.RunSQL statement
that will append this date to my table creating a new record?

Better yet, can I have a combo box listing the [RegisterDates] from this
table so I can choose which record to pull up and if so, I would like to
have
the ability to add a new [RegisterDate]/record in the manner described
above?

Thanks for your ideas and help
 

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