Search results

  1. M

    Enter Parameters for Qry Recordset

    I finally got it working. The prompts don't pop up but parameter values now come from textboxes on the form. Set db = CurrentDb Set qrydef = db.QueryDefs("qryIssueswithDateParameters") qrydef.Parameters("Start Date") = Me.txtStartDate qrydef.Parameters("End Date") = Me.txtEndDate...
  2. M

    Enter Parameters for Qry Recordset

    CJ, thank you for the response. Unfortunately, I'm exporting to a new blank xlworkbook so the transferspreadsheet command won't work. Here's most of the code for a better idea: Set xlApp = Excel.Application xlApp.Visible = True Set xlwb = xlApp.Workbooks.Add Set xlWs = xlwb.Worksheets.Add...
  3. M

    Enter Parameters for Qry Recordset

    Hi All, I have a query with a "Between [Sdate] and [Edate] a the parameter for a DateOpened field. I'm able to export the query recordset to Excel using a button On Click, however I can't get the parameter prompt to come up to enter the start and end dates. This gives me "Too few parameters...
  4. M

    Export Multiple Table Records to Email Body

    Eugin, I got it albeit probably not the most efficient way but it works. Basically, I used IF THEN for each AIROPSID, the one below is for ="1" then the rest follow suit. 'searches strqry rec for any AirOpsID = 1 rec.MoveLast With rec .FindFirst "AirOpsID = 1" If...
  5. M

    Export Multiple Table Records to Email Body

    So I've been attempting but I can't make it work. Ultimately, what I'm trying to do is all records with AirOpsId = 1, put those records in an email, then records with AirOpsID = 2 in a different email and so forth but no luck.
  6. M

    Export Multiple Table Records to Email Body

    I don't like to be bothersome however I do have another question that I thought would be simple and maybe it is but its eluding me. How can I filter records where AirOpsID = "1" and send those to the email instead of all records? Regards,
  7. M

    Export Multiple Table Records to Email Body

    Works perfectly, many thanks! The strqry pulls from a temptbl and there won't be more than 20-40 records each time. Thank you again! Cheers
  8. M

    Export Multiple Table Records to Email Body

    Eugin, Thanks for looking into this! Here's what I have so far which works great expect I can't get more than one record. Private Sub Command21_Click() 'On Error GoTo Errorhandler Dim olApp As Object Dim olItem As Variant Dim olatt As String Dim olMailTem As Variant...
  9. M

    Export Multiple Table Records to Email Body

    Hi All, I've managed to write a script to send one record to the body of email, but I'm lost on how to get all records in a table to the body. Any advice is greatly appreciated! Regards,
  10. M

    Update Multiple Recs from Form

    Ok, I found some good info using a listbox to update my table (baldyweb . com/multiselectappend). So I have the code but I get a "Run Time Error 3164 Field cannot be updated." at rst!ID = ctl.itemdata(varitem) Any suggestions? Here's the code in use: Set ctl = Me.listAMRRecords For Each...
  11. M

    Update Multiple Recs from Form

    Hello all, I'm currently at a lost but here's what I'm attempting to do. In my Form, I would like to show a qry in either Continuous or Datasheet view. With that in mind, I want a user to be able to highlight multiple non-consecutive records or select those records via a chkbox. Then using...
  12. M

    Export/Save As Pivot Table from Access to Excel

    Good Day All, I am using MS Office 2010 and trying to export a pivot table from a query to Excel then Save automatically. The following works exporting the pivot table to Excel but for the life of me I can't get it to Save using my strFileName and strFilePath: DoCmd.OpenQuery...
  13. M

    Question strSQL = Run Time Error 3075 Syntax Error Missing Operator in qry Expr

    Appreciate the assist Paulo but no luck. Going to try another approach, would you happen to know how to export selected items in a list box to excel using VBA? Cheers
  14. M

    Question strSQL = Run Time Error 3075 Syntax Error Missing Operator in qry Expr

    Hi Paulo, Sincere thanks for helping. I included = in ORDER BY as follows: " ORDER BY tblMasterPersonnel.LastName, (tblMasterPersonnel.FirstName)=""" Which now produces the following error: Run Time error 3075 Extra ) in query expression '(tblMasterPersonnel.FirstName)="042" Or...
  15. M

    Question strSQL = Run Time Error 3075 Syntax Error Missing Operator in qry Expr

    Hello all, I've come across a simple error that has me baffled. I continue to receive the run time error 3075: Syntax error (missing operator) in query expression 'tblMasterPersonnel.FirstName"042" Or (tblMasterPersonnel.EmpID)="044"))' Here is the strSQL strSQL = " SELECT...
Back
Top Bottom