Simple table inserting data from cell to cell

Creating and using forms
Post Reply
nubb mike
Posts: 3
Joined: Mon Jan 11, 2016 11:25 pm

Simple table inserting data from cell to cell

Post by nubb mike »

i have a simple table of 3 columns, id, date, and week ending
i want to create a form that inserts a week ending date based on the date inputted. example, when someone enters 1-14-16 then 1-18-16 is placed in the week ending cell with no help or inputting. i figured some type of if this then that conditional statement. i first thought of having two tables one with days and end of week which can be sorted based on the date entry and then have the second table input the week ending result into first table and though i was able to sort the two together i was unable to insert the data from the second table into the first. Any thoughts, i suspect there are probably many different ways to do this but i am lacking.
OpenOffice 4.12 on Windows 7 Professional
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: simple table inserting data from cell to cell

Post by F3K Total »

Hi,
as long as the embedded HSQLDB does not support DATEADD() function i found a query-workaround, which is slow, because it uses DATEDIFF() in it's condition to find the WeekEndDate. For me it's Sunday, so it should be 01/17/16 instead of 01/18/16 as you wrote?
See attached example.
R
Attachments
WeekendingDate.odb
(20.54 KiB) Downloaded 154 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Post Reply