Recent content by TheEvilSam

  1. T

    If - else error?

    edited the query to SQLStore = "INSERT INTO TblSaleStore (ProductID) VALUES (TblTotalSale.ProductID) FROM TblTotalSale WHERE TblTotalSale.ProductID = " & Me.CboStockItem.Value but still not working
  2. T

    If - else error?

    I have a query as follows Private Sub StockOK_Click() Dim SQLDelete1 As String Dim SQLDelete2 As String Dim SQLUpdate As String Dim SQLStore As String SQLDelete1 = "DELETE * FROM TblStock WHERE TblStock.ProductID = " & CboStockItem.Value SQLDelete2 = "DELETE * FROM TblTotalSale WHERE...
  3. T

    Insert Into

    I just thought It would be easier to Insert the values into a table to generate a report I could do it as a query I suppose, this is going to be generated via a button on a form in the admin section of the database. the query I have for sales so far generates the following and I need to combine...
  4. T

    Insert Into

    It is working, as such, It is giving a parameter box enter value for SalesByHalfPintBottleorCan I'm not trying to store the data, Its gonna be stored long enough to create a report as there are 10 of these I need to do for the report then the tables data is going to be erased. not a perminant...
  5. T

    Insert Into

    so I have a query that will insert into a table some values. It goes as follows INSERT INTO TblStockFinal (StockLevels) SELECT (SUM(QrySales1.SalesByHalfPintBottleorCan)) FROM QrySales1 WHERE QrySales1.ProductID=1 OR QrySales1ProductID=2; but this is not working. Any Idea why.
  6. T

    Count, but some as Halves

    How would I go about making it sum products with ID 1 and 2 together, 3 and 4 together, 5 and 6 together, 7 and 8 together, and 9 and 10 together because each of these is the same product, just different sizes? thanks Sam
  7. T

    Count, but some as Halves

    Oh god, thanks.... I feel dumb, I did actually use 2 instead of '2' first but i turned to '2' just to see if it would work... Its actually a business and It degree and we have done little IT and just one module on access... but I enjoy it when I'm not being stupid. Thanks for the help, your a...
  8. T

    Count, but some as Halves

    kk so I am creating a new feild in the table with an expression using IIF I used IIf([ProductID]='2' Or '4' Or '6' Or '8' Or '10',0.5,1) but all the items were 0.5, what am I doing wrong? Thanks Sam
  9. T

    Count, but some as Halves

    Hey. So this is for my dissertation and it is coming allong pretty well. almost finished it now xD Anyway, I'm making a pub Epos system in access and its all OK, except now I have reached the stock control. To get the query (Stock = Stock - Sales) I need to do a count query, which is easy...
  10. T

    cross table subtraction with a “where” clause

    so I have a number of table in my access database. one of the tables is called "tblCurrentSale" and another is called "TblDraughtStock" The current sales table has the following layout CurrSaleID| DraughtID| SpiritID| SoftDrinkID| BottleID| Item__| SalePrice|...
  11. T

    Subreport on form. sum() not working well?

    Hey I have a form which has two subreports on it, each with a column of numbers (Currency) and a totals bit at the bottom which adds up the values added. I have used the me.Refresh command alot, and new lines in the reports show up, but for some reason the totals box at the bottom only shows...
  12. T

    IF SUM(column)<= 0 then

    Oh My God. You are a genius. I made SQLMoney = "Yes" if <=0 and "no" for else and it works perfectly when using those as parameters for the rest of the code. Thank you so much, I would never have thought of that.... :)
  13. T

    IF SUM(column)<= 0 then

    (Solved) IF SUM(column)<= 0 then Hi All I am making a till system for a project in access and I have hit a block. *Background* There are numerous forms covered in buttons. clicking a button adds data to a table (TblCurSale) including description and price of item. each form also has a...
Back
Top Bottom