none
How can i add data to Access database with start date and end date? RRS feed

  • Question

  • Hi gays

    I want to add the same value in an database for the same contact for a few days with start day and end date. How can i do that?

    Thanks in advance

    Saturday, October 3, 2015 5:19 PM

Answers

  • First create an auxiliary calendar table of all dates over an extended range, e.g. the next ten years.  You  can then execute an 'append' query in which your Contacts table and the Calendar table are included, but not joined.  Restrict the query by parameters defining the start and end dates required, and insert the values form date column from the Calendar table, and the ContactID (or similar) column from the Contacts table into an Appointments table or similar.

    For means of creating various types of auxiliary calendar tables see Calendar.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    Ken Sheridan, Stafford, England

    • Marked as answer by jonmachi Saturday, October 3, 2015 6:18 PM
    Saturday, October 3, 2015 6:03 PM

All replies

  • I want to add the same value in an database for the same contact for a few days with start day and end date. How can i do that?

    Post example data of what you mean.    Post the before and after record examples.

    Build a little, test a little

    Saturday, October 3, 2015 5:55 PM
  • First create an auxiliary calendar table of all dates over an extended range, e.g. the next ten years.  You  can then execute an 'append' query in which your Contacts table and the Calendar table are included, but not joined.  Restrict the query by parameters defining the start and end dates required, and insert the values form date column from the Calendar table, and the ContactID (or similar) column from the Contacts table into an Appointments table or similar.

    For means of creating various types of auxiliary calendar tables see Calendar.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    Ken Sheridan, Stafford, England

    • Marked as answer by jonmachi Saturday, October 3, 2015 6:18 PM
    Saturday, October 3, 2015 6:03 PM
  • here is what i want

                         1/10/2015          2/10/2015        3/10/2015

    john                     1                          1                      1

    Tom                      1                          1                      1

    I need to insert the 1 for these days for john at once.

    Saturday, October 3, 2015 6:07 PM
  • thank you my friend
    Saturday, October 3, 2015 6:13 PM