Recent content by mikewood1980

  1. M

    Problem Using Query in VBA

    That works a treat - thank you very much!
  2. M

    Problem Using Query in VBA

    Hi I am trying to execute the following query in my VBA code: sQuery = "select * from tblVerticalTests where ((tblVerticalTests.chrReportID) = '" & Me.cboReportID & "') and ((tblVerticalTests.Airborne/Impact) = 'Airborne')" You will see that tblVerticalTests has a field called...
  3. M

    docmd running before it's supposed to...

    Hi I have the following code: Dim rsWallCons As Recordset sQuery = "select * from tblWallConstructions where ((tblWallConstructions.chrTestID) like '*" & Me.cboReportID & "*')" Set rsWallCons = dbcurr.OpenRecordset(sQuery)...
  4. M

    Creating a new table from a recordset in vba

    Thanks namliam! Any chance you could show me how to delete the table too ;) Thanks again!
  5. M

    Creating a new table from a recordset in vba

    Hi - thanks for that! I tried the following code but get a syntax error.... (Run Time Error 3290 - Syntax error in CREATE TABLE statement) sQuery = "select * from tblLining where ((tblLining.chrOuterBoard) = 'Duraline 13mm' or (tblLining.chrOuterBoard) = 'Fireline 15mm' or...
  6. M

    Creating a new table from a recordset in vba

    Hi I have created a new recordset in my VBA code using a query (i.e. set rs = dbcurr.openrecordset(sQuery) - where sQuery is the query string). is the any way of saving the reultant recordset as a new table? Thanks for your help Mike
  7. M

    .recordcount returning odd values...?

    Cheers Guys Just tried that and it solved the problem! Thanks again! Mike
  8. M

    .recordcount returning odd values...?

    Hi Guys I have the following code: sQuery = "select * from tblBoardChoices where ((tblBoardChoices.intMassPerM2) >= " & intBoard1Low & ")" MsgBox (sQuery) Set rsBoardTypes = dbcurr.OpenRecordset(sQuery) rsBoardTypes.MoveFirst MsgBox (rsBoardTypes.RecordCount)...
  9. M

    Invalid use of NULL (?!!)

    Thats great - thanks guys - I tried namliam's idea first and that worked!
  10. M

    Invalid use of NULL (?!!)

    Hi Can anyone help me with this - I keep getting an error on the line marked *** "Invalid use of NULL". The only way that the code can reach this line is if rsWallCons("intLeafID2").Value is NOT null - how is this possible?!!? If rsWallCons("intLeafID2").Value = Null Then...
  11. M

    Invalid use of NULL (?!!)

    Hi Can anyone help me with this - I keep getting an error on the line marked *** "Invalid use of NULL". The only way that the code can reach this line is if rsWallCons("intLeafID2").Value is NOT null - how is this possible?!!? If rsWallCons("intLeafID2").Value = Null Then...
  12. M

    Error 3061 - Too few parameters - expected 1.

    Thanks guys - that really helped! Mike PS thanks for the tips Namliam!
  13. M

    Error 3061 - Too few parameters - expected 1.

    Hi When executing the following SQL statement in VBA... Private Function createAdverseDeviationsString(strTestID As String) As String Dim dbcurr As Database Set dbcurr = DBEngine.Workspaces(0).Databases(0) Dim sQuery As String sQuery = "select * from...
  14. M

    Form Buttons No Longer Working!

    Hi Guys This one is resolved now - It seemed to me that somehow the form had lost the link to the VBA code so I created a new button and created an event for that and everything started working again - Bizarre! Mike
  15. M

    Form Buttons No Longer Working!

    Also this extra information came with the error :D This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access...
Top Bottom