Search results

  1. M

    Update query with two conditions

    Do you see why I get a "Syntax error" when I try to run this SQL instruction? UPDATE Clienti_Ricette SET Residuo = Residuo - 46,48 WHERE Residuo >= 46,48 AND IDCliente = 472 The WHERE part gets highlighted.
  2. M

    DSum and values in different records

    I wish I could make this simpler, but that would require a coding prowess I undoubtedly lack. Regardless, I think so far the routine might still be valid; I now need to modify so it runs a query and subtract the excess value if another check is available. Something like "SELECT IDRicetta FROM...
  3. M

    DSum and values in different records

    I have a table that holds the information for the "Ricette" (literally prescriptions, practically checks provided to some of our customers by the public health system). I think an example will come in handy to explain the situation. A customer places an order for a total worth of 95€. She has...
  4. M

    Double Click List Box

    the syntax of the if statement is the following: the code is executed only if the condition/s is/are met, therefore if no selection is made, the only code that will be executed is that before the "else" statement (that is, only a msgbox will appear). Conversely, if the condition/s isn't/aren't...
  5. M

    Conditional relationship

    Consider the following: Clienti_Ricette (Customer_Prescriptions) holds the information for the vouchers of different worths that customers may or may not have/use. Therefore I'd like to do so that Ordini (orders) be related with Pagamenti_Ricette (Payments_Prescriptions) only when a given...
  6. M

    2 combo boxes for 1 field

    I gave up and changed my table's structure to have two different fields for month and year, so that my 2 combo boxes are bound to each of those. I then use the SQL syntax + ' ' + to concatenate the result so that it shows in a single column in my listboxes, read...
  7. M

    2 combo boxes for 1 field

    basically I think you provided the right code for the task, just not all of it. That is, at this point, how do I assign the string strbox1 & "v-" & strbox2 to the Date field at the current record in my table?
  8. M

    2 combo boxes for 1 field

    I have a text field in a table that has an input mask like the following [MON]-[YEAR] example: APR-2011 Can two combo boxes be used to input the first and the latter part like in the following, let's say, "drawing"? [___v]-[____v] JAN 2011 FEB 2012 MAR 2013 and so on..
  9. M

    [Newbie] Date based report

    Hello, I thought this would be easier but as I got to work on it I realized I had no clue how to do it. I have a tblOrders that is generally updated every day with new orders. In said table are two fields: DateAdded and DateDelivery. My idea is to allow the user to print a report by...
  10. M

    SUM query and use of returned value

    Yes, I'd gotten that from your first reply, though I'd rather use it in the click event: often the value differs by a great amount and in those cases it's better not to populate the field automatically.
  11. M

    SUM query and use of returned value

    Beautiful, exactly what I was looking for. Thank you very much :) Oh and never mind what I said about the .RowSource property.. I was just wondering what the equivalent - I used it for similar purposes in list and combo boxes - for text boxes might be in VB so to use it with my button. (For any...
  12. M

    SUM query and use of returned value

    mySQL = "SELECT SUM([PrezzoDettaglio]*[Quantita]) " & _ "FROM Ordini_Prodotti " & _ "WHERE IDOrdine =" & Me.IDOrdine.Value I am trying to use a button in a form to run this and display the returned value in a text box connected to the tblOrders.Totals field (that...
  13. M

    Run a query with value from cbobox to populate a listbox

    thanks to your help I managed.
  14. M

    Run a query with value from cbobox to populate a listbox

    I have been googling this for a while now, to no avail. I am using a combobox in my form with this syntax to show customers who have placed orders: SELECT DISTINCT Ordini.IDCliente, Clienti.CognomeContatto, Clienti.NomeContatto FROM Ordini, Clienti WHERE Ordini.IDCliente = Clienti.IDCliente...
  15. M

    BackStyle property

    beautiful, cheers
  16. M

    BackStyle property

    I did, and got the same error: Type mismatch on line -> For Each txt In Me.Form
  17. M

    BackStyle property

    I have this button in a form that's used to go to a new record so that user can fill various textboxes. These textboxes are by default transparent, so to look non-editable. Therefore I want them to become Normal as the user clicks on that button. On the _click event I used the following code...
  18. M

    (supposedly easy) list box selection detail

    Thanks for your reply, good solution
  19. M

    Customers and Orders tables - simple relationship

    beautiful, thanks for your help and the precious link.
  20. M

    Customers and Orders tables - simple relationship

    That fixed it, but there's a problem with date formats, in my country we use the format dd/mm/yyyy, and access seems to go fine by this format with the date pickers in the forms. When running this query, though, I think due to how SQL is designed, it swaps month with day and messes everything up.
Back
Top Bottom