Search results

  1. B

    Map columns dynamically

    Hi all, got the following issue: There are two tables A und B. Table B contains columns like 1FC, 2FC,...., 12 FC standing for forecast sale quantities. Now I want the user to decide how many FC columns he wants, always starting with 1FC. Let's say he wants three FC columns. Now I want to...
  2. B

    Extract variable count of columns

    Hi all, I wanna extract a variable count of columns and transpose it to another table. My source table is called FC containing columns like 1 FC, 2 FC .., 12 FC My target table is called Forecast_Quantities Tried the following: Public Sub TRANSPOSE() Dim rs As DAO.Recordset Dim rsNew...
  3. B

    Table structure change in VBA

    Thanks JHB, this was the solution I was searching for. Thanks again. Regards, Ben
  4. B

    Table structure change in VBA

    Hi JHB, thanks for the hint. How can I use a Union query if both tables don't have identical column names?
  5. B

    Table structure change in VBA

    Hi all, I get a table with the following structure: Customer 1st Month 2nd Month 3rd Month ABC 55 63 21 Each month is showing the quantities. The count of columns can be variable for each time. How can I turn this structure into : Months...
  6. B

    How to sum up special column

    Hello Plog, the issue is that my source data with the actual numbers is in the format like : Reporting_Month, Customer,Quantity 012013,aaa,552 022013,bb,222 .. 082013,cc,523 Now I get a table provided containing the forecast numbers: Customer, 092013,102013,112013,122013...
  7. B

    How to sum up special column

    Hi all, is it possible to tell VBA to sum up all columns with the column name containing a special string. For example I want to sum up all columns containg 2013 as a column name. Thanks in advance. Regards, Ben
  8. B

    Dynamically select months

    Hi all, can I use a collection for this issue? I thought about this: Got one table called ACTUALS containing the column Reporting_Month. When I create a query calles Reporting_Months showing me the Reporting_Month and the Sum of sold items. Now I have sth. like this: 012013 4442 022013...
  9. B

    Dynamically select months

    Yes I created a form, where the User can type in the count of months he wants to see. This Reporting_Month format appears also in many other tables here. Therefore I wouldn't like to change it, if not absolutely neccessary.
  10. B

    Dynamically select months

    Hi all, I got the following issue: There's a table containing all sales quantities for each month, looks like: RepMonth Quantity 012013 55 022013 4654 ... 112013 4645 122013 778 Now the User should decide how many months he wants to see...
  11. B

    How to use variable column names

    Thanks Paul, you helped me out once again. Regards, Ben
  12. B

    How to use variable column names

    Hi all, how can I use the column repmonth in the following statement? repmonth is as a string declared and given by the user, in my case repmonth = 112013. Thanks in advance. Regards, Ben Public Sub TEST2() DoCmd.RunSQL "SELECT PPC_REPORT.Reporting_Month, Report_Products.Division...
  13. B

    Convert a number column into a string column

    Hi all, I want to convert a number column into a text column. Number Column is called Customer. Below I can't match to the other table containing the text column Customer No. How can I convert columns in vba? Thanks in advance. Regards, Ben strSQL = "SELECT CALCULATED_Forecast_TNS.*...
  14. B

    Replace function in vba

    Thank Simon. Now it works out.
  15. B

    Replace function in vba

    Hello Paul, thanks for your reply. How can I check for all columns, blank values can appear in different month columns. I need to check every column if a blank value exists. Regards, Ben
  16. B

    Replace function in vba

    Hi all, how can I check if a table contains blank fields/values. If there are blank fields I want to replace them with 0. Can someone help me out here? Thanks in advance. Regards, Ben
  17. B

    How to add a string to a date

    Thanks Paul, this works now. Regards, Ben
  18. B

    How to add a string to a date

    Hi all, I want to add a string as year to a date. Somehow it doesn't work out. It should extract all records with Valid_from = 01.01.2013 and valid_to = 31.12.2013. The Year assignment works. Can somebody please help me? Thanks in advance. Regards, Ben Public Sub BEN() Dim strSQL As String...
  19. B

    Create a cross tab query with SQL

    Thanks Paul, without your help I wouldn't know how to survive here. Thank you again. Regards, Ben
  20. B

    Create a cross tab query with SQL

    Hi all, I try to create a cross tab query via SQL. Somehow the below code return me a Run-Time Error '3000'. Can someone please help me out here? Thanks in advance. Regards, Ben Sub TEST2() Dim strSQL As String DoCmd.SetWarnings False strSQL = "TRANSFORM...
Back
Top Bottom