Recent content by sargon

  1. S

    Texbox.value = Query

    I am working with a database that I did not create and that I do not fully understand. On the current form, the operations at a work point are displayed, and my boss wants the name of the person in charge to appear on this form, which he obtains from Old as a subform of Emp.
  2. S

    Texbox.value = Query

    I can't figure out what's wrong with this SQL statement. I need to show on texbox Name&Surname... Private Sub Form_Current() Dim strSQL As String Dim rs As DAO.Recordset strSQL = "SELECT Old.EmpD, Emp.Name, Emp.Surname, Old.Place FROM Emp INNER JOIN Old ON Emp.EmpID = Old.EmpID WHERE...
  3. S

    Help combining two queries into one

    @Brian, I try to migrate from access 2010 to VB2010. I need to make a vb frontend... and VB is so different. I don't know how to use two queries in vb (query + subquery).
  4. S

    Help combining two queries into one

    First query = Sum Products: SELECT Sum(Tab1.Inputs) AS SumOfInputs, Sum(Tab1.ValInp) AS SumOfValInp, Sum(Tab1.Outputs) AS SumOfOutputs, Sum(Tab1.ValOut) AS SumOfValOut, Products.Product, Products.VAT, Products.UM FROM Tab1 INNER JOIN Produse ON Tab1.ProductID = Products.ProductID GROUP BY...
  5. S

    automatic combine sql code of two query

    In Access I have made two query: 1) Query1- a subquery 2) Query2 - that use first subquery Is there a way to automatically combine the SQL code of those two queries in Access, so there will remain only one query?
  6. S

    RunningSum include field from Header in Detail

    I have one Report based on a query that select fieldA from Table1 and fieldB from Sum Query1. fieldB is on the Report Header and FieldA is on Detail. I need to add FieldB as the first field to the RunningSum FieldA.
  7. S

    Subform textbox calculation send to Table

    Yes, it works! Thank you. For my curiosity... is there a way to make calculation in the subform and send it to table (not to make the calculation in the table), simillary to that when I type it? For a simple form the solution is Insert Into...
  8. S

    Subform textbox calculation send to Table

    I have tables tbInvoices and subtbInvoices and forms frmInvoices and subfrmInvoices. I need that a calculation from subform subfrmInvoices to be sent to the corespondent field in table subtbInvoices. In the subfrmInvoices (and in subtbInvoices) I have 5 fields : Combox TexboxID textbox1 - I...
  9. S

    AfterUpdate Combobox, TextBox = Query

    I have this query: SELECT CMP.CMP FROM CMP LEFT JOIN Products ON CMP.ProductID = Products.ProductID WHERE (((Products.ProductID)=[Forms]![Outputs]![cmbProduct])); and one form (Outputs) that have one combobox (cmbProduct) and one textbox (txtPrice). txtPrice must be equal to query result...
  10. S

    Function Select Sum

    I dont know how to put into a variable the result of an SQL...
  11. S

    Function Select Sum

    I have: 1) Table1 containing fields: ID, Name, Wage, WorkingHours, Date, 2) Form1 containing: txtDate, txtCO I must create a Function that Sum the Wage from last 5 days. Exp1 = DSUM([Wage],[Table1],Where Date <[Forms]![Form1]![txtDate]-5) But I must do it in SQL (VBA). I can't undesternd...
  12. S

    Check if data already exist in table

    Thanks, This is my working code: Private Sub cmdBtn_Click() On Error GoTo Err_cmdBtn_Click Dim stDocName As String Dim stLinkCriteria As String Dim I As Integer Dim Y As Integer I = DCount("[Year]", "Table1", "[Year] = " & Me.[txtYear] & "") Y =...
  13. S

    Check if data already exist in table

    I have two textboxs (txtYear and txtMonth) and one button (cmdBtn) in Form1 I need to check if the data typed the txtYear and txtMonth already exist in Table1 (Year , Month) when I click the button. If Year And Month exist in Table1 Then MsgBox "Data already exist" Else Open Form2 EndIf...
  14. S

    Avco

    Hi, Can someone pls attach a simple db that calculate average cost (AVCO) of a product, or post a VBA function that calculate the average cost? thx
  15. S

    IIF field is Null then field=previous

    Can somebody please tell me how make the IIF command that the value of the field to ber equal to the value from the previous field?
Top Bottom