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...
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...
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...
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 =...
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...
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...