Recent content by alan2013

  1. A

    Inserting numeric values into a Table, using SQL : What's the correct VBA code to use in the VALUES part of the code ?

    Thanks, ebs17 & UncleGizmo. I'm continuing to sort it. The error I'm getting right now (seen it before with some other variations I tried) : Run-time error 3346 : Number of query values and destination fields are not the same.
  2. A

    Inserting numeric values into a Table, using SQL : What's the correct VBA code to use in the VALUES part of the code ?

    I'm having difficulty in creating the VBA code required to - on the click of a button on a Form - insert some data recorded on that Form into a Table (ie. one that isn't the source for the Form). The data recorded on the Form that needs to be inserted into the (other) Table : dtTestDate...
  3. A

    Solved Problems inserting records into a table using SQL : maybe an error in my concatenation ?

    Thanks, ebs17. I've taken that on board, and altered by code to take that into account.
  4. A

    Solved Problems inserting records into a table using SQL : maybe an error in my concatenation ?

    It's a Short Text field, in which I enter Yes or No. Thanks for your interest. In any case, my error seems to be in the order of my lines of code, as pointed out by ebs17.
  5. A

    Solved Problems inserting records into a table using SQL : maybe an error in my concatenation ?

    Could someone help me pinpoint where I'm going wrong with the following, please ? I'm attempting to insert a record into a Table named tblTasks, using the VBA code below. Dim strTaskInsertionSQL As String Dim strTaskTitle As String strTaskInsertionSQL = "INSERT INTO tblTasks (TaskTitle...
  6. A

    Solved Copying data from Quote-line-items Subform to Sales-Order-line-items Table : Error 3022

    I think I'd been a bit careless in cutting-n-pasting code around. The code you provided certainly seems to have worked. Thanks ever so much !
  7. A

    Solved Copying data from Quote-line-items Subform to Sales-Order-line-items Table : Error 3022

    "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try...
  8. A

    Solved Copying data from Quote-line-items Subform to Sales-Order-line-items Table : Error 3022

    In my database, I have a 'Quote' form with a Quote-line-items subform (sfrmQuoteLineItems) and a 'Sales Order Form' with an 'Order line items' subform (sfrmOrderLineItems) In the header of sfrmQuoteLineItems, I've placed an unbound field (unbQuoteLineItemsRecordCount) to provide a count of the...
  9. A

    Solved Error 94 (Invalid use of Null) on a line in a Function used in a database adapted from Northwind 2.0 Developer

    omg, I've realized I made a 'school-boy' error. I replaced sql = StringFormatSQL("select * from tblStockTakes where intProductID_PK = {0} order by dtStockTakeDate desc;", lngProductID) with sql = StringFormatSQL("select * from tblStockTakes where intProductID_FK = {0} order by...
  10. A

    Solved Error 94 (Invalid use of Null) on a line in a Function used in a database adapted from Northwind 2.0 Developer

    Thanks. I think I see why you made that suggestion. Trying that, I get a 'Too few parameters. Expected 1' error.
  11. A

    Solved Error 94 (Invalid use of Null) on a line in a Function used in a database adapted from Northwind 2.0 Developer

    Thanks to everyone who's made suggestions so far. I'm working through them, continuing to try to get the ProductLastStockTakeQuantity Function to work. It seems that I also have some issue with Function ProductLastStockTakeDate (and of course the ProductLastStockTakeQuantity Function depends on...
  12. A

    Solved Error 94 (Invalid use of Null) on a line in a Function used in a database adapted from Northwind 2.0 Developer

    Thanks for your reply. I'm nowhere near my PC just now, and won't be for another few hours now. As soon as I'm able to, I'll try that, and let you know. Thanks again.
  13. A

    Solved Error 94 (Invalid use of Null) on a line in a Function used in a database adapted from Northwind 2.0 Developer

    I'm trying to create a database based on the Northwind 2.0 Developer database, but capturing & displaying dates (including stock-take dates) in Medium format (dd-mmm-yy) instead of Short Format (as in Northwind). I'm encountering a 'Invalid use of Null' error (Error 94) that point to the...
Top Bottom