Recent content by jmsjazz

  1. J

    Attaching files to email Access 2016

    Thanks again for your advice - just found the solution by searching for the 16.olb file in the forum - this was posted here by Ganymede: I removed DAO3.6 and added the file from the shared\Office16 folder and it worked. Many thanks -
  2. J

    Attaching files to email Access 2016

    Thanks for this - but it won't let me remove or switch the Access 15 engine as it is in use - how can I do this?
  3. J

    Attaching files to email Access 2016

    The attached code was written to enable a database form with multiple attached pdfs to be emailed from the command-click button on the form. Since some machines have been upgraded to the latest versions of Windows 10 and Office 16, I get different errors, such as "User-defined Type not defined"...
  4. J

    Create textboxes on form using VBA

    Hi..I have managed to do this...let me know if you would like to see my attempt! I took the advice of not creating controls, instead making them visible and positioning using left, top and width parameters.
  5. J

    Passing variable to report record source

    Thanks pbaldy, I posted this and didn't realize you had replied. I did get it working with your help.
  6. J

    Create textboxes on form using VBA

    In the time between my original post and your replies, I did get it to work using a routine that included this: For i = 1 To C With CreateControl( _ formname:="searchreport", _ ControlType:=acTextBox, _ Section:=acDetail, _...
  7. J

    Create textboxes on form using VBA

    Do you know how to add a text box to a form in VBA? And how to position /size it?
  8. J

    Create textboxes on form using VBA

    I have a form with checkboxes, indicating fields which can be selected for a query. The strSQL variable works fine, and I can use QUERYDEF to create a query from the variable. I wonder if it is possible to generate a form to display only the fields chosen - i.e. I don't want a general form...
  9. J

    SEND SQL parameters to report

    Many thanks - I didn't realise it worked for reports as well as forms!
  10. J

    SEND SQL parameters to report

    Thanks, but I need to use the strSQL variable, as I don't know what field(s) will be chosen. An example string might include, e.g. [Colour] = 'Blue' AND [Year] = '2011' AND [OrderNo] = '1234'
  11. J

    SEND SQL parameters to report

    I have an SQL statement which is dynamically built on a form. It can be truncated to read [Colour] = 'Blue' or it can be left as a complete statement - SELECT * from tblOrders WHERE [Colour] = 'Blue' The statements work when I open a form. Is there a simple way to open a report (or query) with...
  12. J

    Passing variable to report record source

    Thanks for your help. I put the "'" after the string, but still get the error. Using msgbox to check the string (which correctly populates a different form), I get the attached string before I trim it, using strsql = right (strsql, len(strsql)-33) - this leaves me [NATURE] = 'hover'...
  13. J

    Passing variable to report record source

    Hi I have a subroutine that successfully builds a SQL statement "strSQL", which is a public variable. Using msgbox, I can read that the value is correct - SELECT * from tblIncidents WHERE [Nature] = 'Hover'; (The select statement may be complex, e.g. [Nature] = 'hover' AND [COLOUR]=...
  14. J

    Multiple field search in combo boxes

    I finally cracked it by using an array to store the statements and build up the SQL where clause: e.g. strSQLHead = "SELECT * FROM tblIncidents " for x=1 to 12 statement(x) = "" next x 'DATE If Len(Me.txtDOBStart & vbNullString) Then n = n + 1 If Len(Me.txtDOBEnd &...
  15. J

    Multiple field search in combo boxes

    My form FrmSEARCH has 12 selections - 4 are combos and 8 textboxes. They are named (e.g) cbotype1 cbotype2 cbotype3 cbotype4 txtsrch1 txtsrch2 etc. When I click cmd SEARCH, it opens the frmSEARCH, whose data property is set to QRYSEARCH. QRYSEARCH is a parameter query as shown in CONTRACTS2...
Back
Top Bottom