Search results

  1. B

    Adding fiels in a query

    Thanks Michael, it works now.
  2. B

    Adding fiels in a query

    Hi all, I want to group a table and show a new column. This new column should be the sum two other columns of the original table called TEST_FC. Somehow it asks me for parameter with this code. Your help is much appreciated. Thanks in advance. Regards, Ben Public Sub FC_QUERY() Dim strSQL...
  3. B

    Append data to another table with a filter

    Now it works. Reason was a false Time_Period value. Thanks to all.
  4. B

    Append data to another table with a filter

    I've changed the query, still it doesn't append anything to FC_TEMP. This time I assign a value to the Time_Period variable in Scrap_Sales_Forecast table. 'Append Scrap Sales forecast to actual FC_TEMP table Public Sub Append_Scrap() DoCmd.RunSQL "INSERT INTO [FC_TEMP] SELECT...
  5. B

    Append data to another table with a filter

    Hi all, I want to append data to the FC_TEMP table with the condition that the time_period is same on FC_TEMP and Scrap_Sales_Forecast table. Somehow it asks me to type in a parameter for Time_Period on FC_TEMP. Can someone please help me here? Thanks in advance. Regards, Ben 'Append Scrap...
  6. B

    How to modify a table

    Hi all, is there a way to use this? Can someone help me with the syntax? DoCmd.RunSQL "UPDATE FC_TEMP SET FC_TEMP.[new_TRP_2013_in_EUR] = AVERAGE_TRP.[Average_new_TRP_EUR] " & _ " FROM FC_TEMP " & _ " INNER JOIN AVERAGE_TRP ON FC_TEMP.[PRODUCT_ID] =...
  7. B

    How to modify a table

    I run this code before to store the average values into the Average_TRP table. How can I avoid to store these Average values, is there a way to combine this with one SQL in order to update the missing TRP in FC_TEMP with the average values of the TRP_2013 table? 'Creating average transfer...
  8. B

    How to modify a table

    Basically I want to replace missing TRP records with the average values of another table, I created before. I took the avergares from a TRP table and created a AVERAGE TRP table out of it. Is there a way to update the FC_TEMP table directly with the average values of the TRP table. Without to...
  9. B

    How to modify a table

    Hi all, I want to modify a table called FC_TEMP via adding some columns from another table called AVERAGE_TRP. Do I have to create a new query table and then insert the output into a new table? The following code shows me : Cannot execute a selected query. Is there a way to update this FC_TEMP...
  10. B

    How to store a query into a temporary table

    Dear all, I want to store a query into a table, which I will delete later on. But somehow it shows me an error: Data type conversion error at the qdf = CreateTableDef assignment line. Thanks in advance guys. Regards, Ben Public Sub LF_Query() Dim i As Integer Dim strSQL As String Dim qdf As...
  11. B

    How to replace some values from another Query

    Paul, I will look how to sort out my basic data. It seems to be inconsistent,which makes my life difficult here. Thanks for your help. This is a great forum here. Regards, Behzat
  12. B

    How to replace some values from another Query

    Yes Paul the product id is blank when a trp price is not there in the LF_QUERY table. It looks ugly. Here the LF_Query code: 'Create LF format and append into final Forecast table Public Sub LF_Query() Dim strSQL5 As String Dim qdf5 As QueryDef strSQL5 = "SELECT LF.ID, LF.PRODUCT_ID...
  13. B

    How to replace some values from another Query

    Paul, in the immediate window I get: UPDATE FORECAST SET FORECAST.[new TRP 2013 in EUR] = 0 WHERE Forecast.[PRODUCT CLASS] = '' AND FORECAST.[new TRP 2013 in EUR] Is Null I don't understand the part UPDATE FORECAST SET FORECAST.[new TRP 2013 in EUR] = 0. It should only replace zero values of...
  14. B

    How to replace some values from another Query

    Paul, I tried your code. It show me an error: Too few parameters.Expected 1. And jumps to the CurrentDB.Execute line.
  15. B

    How to replace some values from another Query

    I really don't want to be a pest. I created another table called AVERAGE_FORECAST_TRP. There are no calculated fields left. When I run the statement below. It runs through without any error, but it doesn't update anything. 'Update missing TRP with average TRP for Forecast Table Public Sub...
  16. B

    How to replace some values from another Query

    Paul, what do you mean?
  17. B

    How to replace some values from another Query

    Thanks for the hint Geotch. I created a Forecast Table with the missing TRP. I tried the UPDATE command with SQL.. But it gives me an error: Operation must use a updateable query. Any idea how I can resolve this? Thanks in advance. 'Update missing TRP with average TRP for Forecast Table Public...
  18. B

    How to replace some values from another Query

    Hi Paul, yes it's a calculated field. Basically I got the following issue: There are some products with no price yet, therefore I created a query which give me the average prices of the belonging product classes. The missing prices of the product should be replaced by the average prices of the...
  19. B

    How to replace some values from another Query

    Dear all, I would like to replace missing TRP information from Query LF with average TRP information coming from Query LF_Average. Somehow it doesn't work. Can someone please help me? Thanks in advance. Public Sub Replace() Dim strSQL7 As String Dim qdf7 As QueryDef strSQL7 = "SELECT...
Back
Top Bottom