Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2012
    Posts
    68

    Unanswered: insert a value into a table after report print

    In short i want to insert the value of a textbox(unbound) into a table for record, between 2 dates Which are selected via start date txtbox and end date txtbox.

    So in detail:

    if records in "items for job transfer" table are between "txtstartdate" (from form) and "txtenddate" (from form) insert value from "reportdate" (from form) into Field "Week Ending Date" (from "items for job transfer" table)

    Hope this makees sense. Ive looked around and cant quite find the best solution or any at that matter. Could anyone point me in the right direction.

  2. #2
    Join Date
    Apr 2012
    Posts
    28
    Your solution seems ok. Have you tried coding it?

    e.g.

    If rsItemsForJobTransfer!yourDate >= txtStartDate And rsItemsForJobTransfer!yourDate <= txtEndDate Then

    CurrentProject.Execute "INSERT INTO tblITEMSFORJOBTRANSFER(week_ending_date) VALUES('" & txtValueFromReportDateForm & "')"

    End If

  3. #3
    Join Date
    Mar 2012
    Posts
    68
    Im about 4-5 weeks new to access and writing code therefore I can write simple code. As for some this may be a simple code, but for me this is a little more complex. I imagine I shoul place the code in the after click of the print button?

  4. #4
    Join Date
    Apr 2012
    Posts
    28
    Quote Originally Posted by bsigmon1103 View Post
    Im about 4-5 weeks new to access and writing code therefore I can write simple code. As for some this may be a simple code, but for me this is a little more complex. I imagine I shoul place the code in the after click of the print button?
    I imagine that you should place the code in the click event of a save button.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •