Search results

  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...
  14. A

    Solved Compile error : User-defined type not defined (Dim xlApp As Excel.Application), due to problem with 'Microsoft Excel 16.0 Object Library' Reference

    So I need to instruct him to go to References, take a look down through the list of Available References, and tick whatever is present in the list where the Excel object library is concerned (ie. add a 'Microsoft Excel XX.X Object Library' Reference, XX.XX being whatever the version number is in...
  15. A

    Solved Compile error : User-defined type not defined (Dim xlApp As Excel.Application), due to problem with 'Microsoft Excel 16.0 Object Library' Reference

    Excuse my further ignorance of early binding, Refereences, etc, DBGuy, but exactly what does he have to do, technically ? Reinstate the 'Microsoft Excel 16.0 Object Library' Reference that was previously un-ticked? (Won't that re-introduce the other problem that he initially encountered ?)
  16. A

    Solved Compile error : User-defined type not defined (Dim xlApp As Excel.Application), due to problem with 'Microsoft Excel 16.0 Object Library' Reference

    In recent days, a colleague sent me an Access database to make some changes to, and I did, and sent it back to him. On opening it, my colleague encountered a compile error : Compile error : Can't find project or library On looking at the 'References' list (my suggestion), he saw amongst the...
  17. A

    Solved On Subform2 within Subform1 : Criteria for a lookup Query (to refer to a control on Subform1)

    The issue seems to have been resolved now, with the addition of the following on Subform2 : Private Sub Form_Current() Me.Field1.Requery End Sub Regarding linking Master & Child fields : Field1_FK on Subform2 was already linked to Field1_PK on Subform1. Reading back over my initial post...
  18. A

    Solved On Subform2 within Subform1 : Criteria for a lookup Query (to refer to a control on Subform1)

    The scenario : I have a Subform1 set within a 'Main' Form. Within Subform1, I have a control (Field1_PK) and a Subform2. On Subform2, I have a combo that takes its data from a lookup Query. Within the Query, I want to be able to limit the records to ones that have a value set to that of the...
Top Bottom