Search results

  1. 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...
  2. 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...
  3. 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?
  4. 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.
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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
  10. S

    IIF field is Null then field=previous

    Hello, I have a problem, pls help! :) B = IIF (A = NULL); then B = previous B; else B = A A B 1 1 6 6 _ 6 4 4 _ 4 _ 4 2 2 3 3 7 7 _ 7 I don't know how to make previous B...
  11. S

    Text Function

    Hello, I have two text columns in a query (colA , colB),and one CheckBox column (colChek).And I want to create column colC:Valid([colChek],[colA],[ColB]). I want to make a Module Function to select between colA, ColB like this: This function works only for numbers, what I must modify to work...
  12. S

    Retrieve previuos record

    Hello, Please tell me if there is a way to retrieve a value from a field in the previous form record in a query that don't have ID (autonumber), using data/time ascending.The function PrevRecVal() from QrySampl can only be used for query that include ID. Thanks
  13. S

    Wacc

    Hello Sorry because I don't speak(and write) good english. In the archived file WACC are database Northwind modified to calculate WACC price and one Word file that shows the way to calculate this price (WACC). In the Northwind I was create two tabels: NIR and subNir (grouped in...
Top Bottom