Search results

  1. A

    Subtract in single table

    Hi all, I have a table that I enter count of each product every day and the products may enter or exit from our warehouse, now I need a SQL code to return total products that we have in the warehouse, like this : A1 in 15 A1 in 16 A1 out 5 A2 in 4 A2 out 2 A3 in 10 A3...
  2. A

    Alignment of group header

    Hello again everyone, Has subform group or merge cells like report? I mean can I do your way on subform like this : Of course I could hide rows except the second record by conditional formatting, but I couldn't add red line at the bottom of records.
  3. A

    Alignment of group header

    bravo arnelgp, that's exactly what I want.
  4. A

    Alignment of group header

    Thank you very much June7, but there is a problem, your trick hide all sname and slump without the second record ([tbxCnt] = 2). whilst the report has other sname and slump in "tbxCnt <>5" or "tbxCnt <>8" or "tbxCnt <>11" ,....
  5. A

    Alignment of group header

    Thanks June7, I used HideDuplicates property, that was great,, but still two fields are on the first row, is it possible to move down the fields with or without vba?
  6. A

    Alignment of group header

    Yest, always 3 records.,can you explain sort way and textboxes to not display repeated?
  7. A

    Alignment of group header

    Hi everyone, I have a database and two columns of one table (sname,slump) is common for 3 records, so I created grouped report by sname, slump. but my problem is that the header record's are on the above of records, like this : Is there a way that header record's will be side of the records...
  8. A

    Solved Subtract two table

    Wooooov,,, A big thanks.
  9. A

    Solved Subtract two table

    No, but I change the fields and tables name to the original names. the SQL code is running without any error, but I think the problem is this part : sum(field2) AS [Cnt] I create a textbox on the subform and whose name is "Cnt", but after run SQL code this field is empty.
  10. A

    Solved Subtract two table

    No, it's not backwards, the calculated number is very different from the actual deducted number.
  11. A

    Solved Subtract two table

    That was great, this work well in query, but why not work in vba? pSQL = "SELECT field1, sum(field2) AS [Cnt] FROM (SELECT field1, field2 from table 1 UNION ALL SELECT field1,-field2 from table2) AS U GROUP BY field1" me.Child01.Form.RecordSource = pSQL Cnt is textbox on subform.
  12. A

    Solved Subtract two table

    Thanks theDBguy , it's working without any error but the result of subtract is not correct.
  13. A

    Solved Subtract two table

    Thank you so much arnelgp , Can you write all the codes with SQL, without build any query ? Like this : dim pSQL as string pSQL = "SELECT qryAllProducts.Prod, (select sum([field 2]) from table1 as a where a.[field 1]=[prod])-(select sum([field 2]) from table2 as a where a.[field 1]=[prod]) AS...
  14. A

    Solved Subtract two table

    Hi all, I have two tables with similar fields, first table is stock of products and the second table is count of sold products, like this : Table 1 Field 1 Field 2 A1 50 A1 30 A2 40 A3 20 A3 60 A2 70 Table 2 Field 1 Field 2 A1 5 A2 4 A2 2 A1 8...
  15. A

    Insert into and select excep ID

    Thank you arnelgp for the function.
  16. A

    Insert into and select excep ID

    In fact, I have about 30 databases with the same fields and I should populate all data of each database in main database, but it's difficult to create query for each database, unfortunately I don't know SQL commands a lot, is there a SQL command to select all field except one field?
  17. A

    Insert into and select excep ID

    I know that, but I don't want to list and type all fields manually, I want to use select all field except "ID".
  18. A

    Insert into and select excep ID

    Hil all, I'm going to select and insert table data from another database to current database, I can do this easily with select and insert all fields (*), but it's difficult to type each field if I don't want to insert except ID field. because there are many fields in the table. pth =...
  19. A

    Solved Nz date

    I’m so grateful for your helps,
  20. A

    Solved Nz date

    Thanks to both of you, you're right CDate is not a correct name for the field name, I changed it to [EnterDate], I'm going to add another condition : If Me.cmb01.ListIndex = 3 Then pSQL - pSQL & querydate & " AND (Ccode <> 4 or Ccode <> 6 )" It means if ListIndex was 3 then select all the...
Back
Top Bottom