Search results

  1. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Hi The Doc Man, Thanks for the VBA code. Since all my table related code are in MS queries, I was thinking it would be easy for me to incorporate the same code in the existing MS query instead of a new separate VBA module. Also can we refer/call this VBA module in the MS query. because I...
  2. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Hi The Doc Man, Thank you for the VBA code. I have all the queries in MS query, so I was thinking, it will be easy if I incorporate the same condition inside an existing MS query than in a VBA module. Between, if I am writing this piece of code in VBA, how will I place this VBA script in the...
  3. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Hi Plog, You are correct, table C is a dummy table, which will be used to populate the columns for another table in order to run the series of MS queries without any error. because when table A is empty, the rows will not have any values, so at that time we wont get the columns as desired...
  4. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Yeah, I get it now. I am going to use Select to contain the data I need. Thanks for clarifying on that :) My doubt is, I want to write a MS query where it checks Table A whether it is empty or not and execute the conditions. If it is in SQL Server, I would have written something like this...
  5. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Once the data is created, then series of queries runs and give multiple excel reports at the end. In this case of empty source table, all the queries should run and return no records in the final output file.
  6. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Yeah, SELECT queries will do, It was my mistake I told it as create table.
  7. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Hey Hi, I am using pivoting and the problem arises only when the source table is empty, because the rows in the source table are pivoted as columns in the table B, which is later used by other queries referencing the column names. Crosstab would not help here, my issue is when I get empty...
  8. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    Thank you for the explanation :):) The actual picture is briefed below: So I have table A, which is the source table. Then I have table B, which I use values form table A and do a pivot to make all the rows of a column in table A into columns in table B. Sometime, Table A is empty and that...
  9. S

    MS Query for Using IF ELSE condition to create a table when source table is empty

    I am using MS Access 2013. I have a query which takes data from other query table. I need to write the MS Query using a condition, say if the source table is empty, then create a table with set of columns, else create a different table with the values from source table. I was trying to do...
Back
Top Bottom