locked
form update subform RRS feed

  • Question

  • i have a form and a subform

    the form has two unbound controls that are start date and end date with a submit button to update the subform.

    on the subform after the update there is a yes/no check box i want to be able to select it and then update that info to a table

    Thursday, February 16, 2012 7:23 PM

Answers

  • To add a new row to a table, create an append query. That will add the start date and end date to the appropriate table.

    If you want to add a start and end date to an existing row in a table, use an update query.

    Create the query in vba, and use the execute method to run the query.

    The following goes in the click event of a button:

    Dim strSQL As String

    strSQL = "your sql string here"

    CurrentDb.Execute strSQL


    Jeanette Cunningham


    Friday, February 17, 2012 12:11 AM
  • was not the answer i was looking for.

    i figured it out using requery

    thanks

    • Proposed as answer by Bruce Song Tuesday, February 21, 2012 8:23 AM
    • Marked as answer by Bruce Song Monday, March 5, 2012 4:22 AM
    Saturday, February 18, 2012 3:21 AM

All replies

  • To add a new row to a table, create an append query. That will add the start date and end date to the appropriate table.

    If you want to add a start and end date to an existing row in a table, use an update query.

    Create the query in vba, and use the execute method to run the query.

    The following goes in the click event of a button:

    Dim strSQL As String

    strSQL = "your sql string here"

    CurrentDb.Execute strSQL


    Jeanette Cunningham


    Friday, February 17, 2012 12:11 AM
  • was not the answer i was looking for.

    i figured it out using requery

    thanks

    • Proposed as answer by Bruce Song Tuesday, February 21, 2012 8:23 AM
    • Marked as answer by Bruce Song Monday, March 5, 2012 4:22 AM
    Saturday, February 18, 2012 3:21 AM