Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2010
    Location
    California
    Posts
    15

    Unanswered: Need to append data from floating fields to a table

    Hello,
    I am having a hard time trying to append data from floating Text Box's that do not have a "Control Source", into a table. I don't want to use the form's control source rather i need to get append to work.
    I have a Single View form with about 8 of these types of fields. I have a command button that runs an append query (see below) to add the data in these 8 fields into a table but it keeps saying 0 records will be appended.

    Would you be able to tell me why I can't append and/or tell me how to append the data in these fields to a table?

    Below is a copy of the append query.

    INSERT INTO tbl_DailyStatsSub ( StatsDate, [Case#], Category, [Sub-Cat], Comments, Amount, TimeSpentHrs, WorkerID, OrginallyCreatedBy, OrignallyCreatedOn )
    SELECT tbl_DailyStatsSub.StatsDate, tbl_DailyStatsSub.[Case#], tbl_DailyStatsSub.Category, tbl_DailyStatsSub.[Sub-Cat], tbl_DailyStatsSub.Comments, tbl_DailyStatsSub.Amount, tbl_DailyStatsSub.TimeSpentHrs, tbl_DailyStatsSub.WorkerID, tbl_DailyStatsSub.OrginallyCreatedBy, tbl_DailyStatsSub.OrignallyCreatedOn
    FROM tbl_DailyStatsSub
    WHERE (((tbl_DailyStatsSub.StatsDate)=[Forms]![frm_DailyStats]![AddDate]) AND ((tbl_DailyStatsSub.[Case#])=[Forms]![frm_DailyStats]![AddCaseNumber]) AND ((tbl_DailyStatsSub.Category)=[Forms]![frm_DailyStats]![AddCategory]) AND ((tbl_DailyStatsSub.[Sub-Cat])=[Forms]![frm_DailyStats]![AddSubCat]) AND ((tbl_DailyStatsSub.Comments)=[Forms]![frm_DailyStats]![AddComments]) AND ((tbl_DailyStatsSub.Amount)=[Forms]![frm_DailyStats]![AddAmount]) AND ((tbl_DailyStatsSub.TimeSpentHrs)=[Forms]![frm_DailyStats]![AddHrs]) AND ((tbl_DailyStatsSub.WorkerID)=[Forms]![frm_DailyStats]![AddWorkerID]) AND ((tbl_DailyStatsSub.OrginallyCreatedBy)=[Forms]![frm_DailyStats]![AddOrginallyCreatedBy]) AND ((tbl_DailyStatsSub.OrignallyCreatedOn)=[Forms]![frm_DailyStats]![AddOriginallyCreatedOn]));


    Your help is greatly appreciated.
    Iram/mcp
    Iram/mcp

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    It would be more like:

    INSERT INTO tbl_DailyStatsSub ( StatsDate, ...)
    SELECT [Forms]![frm_DailyStats]![AddDate], ...
    Paul

  3. #3
    Join Date
    Sep 2010
    Location
    California
    Posts
    15

    Appending

    I can't get it to work. Would you be able to give ma bigger example, including the Where's and And's?

    Iram/mcp
    Iram/mcp

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    There wouldn't be any. You don't want to pull data from a table, so the WHERE clause is unnecessary.
    Paul

  5. #5
    Join Date
    Sep 2010
    Location
    California
    Posts
    15

    Appending

    Got it!

    You are the man, pbaldy!


    Thanks.


    Iram/mcp
    Iram/mcp

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help!
    Paul

Posting Permissions

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