Search results

  1. M

    OnClick Event Procedure not working.

    Private Sub Command14_Click() 'Variable Declaration Dim RawMaterial As Integer Dim YieldCalc As Integer Dim cts As DAO.Database Dim rs As DAO.Recordset Dim qry As String Dim tPCon, tPCat As String Set cts = CurrentDb 'Initialising the variable by setting it to 0 YieldCalc = 0 'Set focus on...
  2. M

    Retrieving data from a query and making a calculation in a form

    Hi, I'm new at VBA and Access. I'm working on a db that will keep track of production in a warehouse. I want to calculate the total yield of product we get given a specific date range. I created a query to retrieve data that I need to make the calculation: SELECT...
  3. M

    Runtime Error 3061 Expected 3

    I tried to concatenate the form references. I still get the same error. Here is the variable and the form references. 'Retrieves the rawMaterial amount in the Stageing table that is associated with the values being currently entered 'And storing it in the variable RawMaterial...
  4. M

    Runtime Error 3061 Expected 3

    qry is a variablw
  5. M

    Runtime Error 3061 Expected 3

    I am trying to run a vba procedure. I am unable to because i get a runtime error 3061 expected 3. Here is the code with the problem. The coloured line is what needs to be debugged. Set rs = cts.OpenRecordset(qry, dbOpenDynaset) Do While Not rs.EOF RawMaterial =...
  6. M

    Expression is not part of aggregate function?

    I think i almost figured out how to work around the aggregate function error. SELECT DISTINCT [qry_search_premiumtot]![PremiumSum]/[qry_search_rm]![RawSum] AS Yield, qry_search_premiumtot.Trailer_ID, qry_search_premiumtot.Employee_ID, qry_search_premiumtot.Production_Date...
  7. M

    Expression is not part of aggregate function?

    They both work. I changed the names, thanks. I need the Raw sql to calculate the yield of Premium by dividing premium over raw in the expression.
  8. M

    Expression is not part of aggregate function?

    I am trying to run a query based on two other queries i have created to calculate tolat yield for product. Here is the SQL for the query: SELECT qry_search_premiumtot.Trailer_ID, qry_search_premiumtot.Employee_ID, qry_search_premiumtot.Production_Date, qry_search_premiumtot.Stage_ID...
Back
Top Bottom