Search results

  1. J

    Find all empty vba fucntions and procedures

    Can someone help with some code that can make a list of empty vba functions and procedures in my access application? I need to do some code cleaning up. e.g. Private Sub Form_Load() End Sub
  2. J

    sql with where clause, group by and (having?)

    Hi Experts, I have need of a sql query to pull some data from the table below. Premise: Every project is assigned a project team. Every project have multiple phases. Each phase is assigned to a few employees. Each employee is assigned a role. I need a query that retrieves records for each...
  3. J

    Solved Save data from a different form. Write Conflict Error

    Hi Experts, I'm in need some help. I have 2 forms. Main form bound, pop-up form unbound. I need to be able to change and save data on the main form using the pop-up form. Using a refresh command to the main form will eliminate the write conflict error but causes a different error because my...
  4. J

    DoCmd.OutputTo acOutputReport Fail

    Happy Holidays Experts, I have some code that has been working for years but new business rules required me to make to some updates. I have some code that creates a report (expense invoice) and export it to PDF via DoCmd.OutputTo acOutputReport. New business rules now require me to capture some...
  5. J

    (MAX) Group By query

    Hi Experts I have a table tblNote with the following fields: NoteID TaskID ReminderDate Note I need a select query that will retrieve the record with furthest date group by TaskID. The query must include the the Note field. Heres my starting point.SELECT TaskID, MAX(ReminderDate), Note FROM...
  6. J

    Print to Docusign VBA

    Hi Experts, I'm looking for a way to send a document to docusign print driver. the code below when it works launches docusign print driver with the document in the print queue. The code below works inconsistently. sometimes it works, sometimes it doesn't work. if i step thru the code it works...
  7. J

    Select query w/ group by

    Hi Experts, I'm trying to write a query that will return only the record that only have RoleID = 1. Group BY ProjectNum. E.g. the record that should be returned is 18003-101-1 because all other project groupings include records with RoleIDs different from 1. Last bit of info to consider, all...
  8. J

    Delete Duplicate Records Sql Server Backend

    I found the code below at this link. I'm trying to delete duplicated records in a table. I've tested it using a local table but and it works perfect. However i get an error (ODBC call failed) when i run this code using sql server tables. The highlighted part of the code is what i added in hopes...
  9. J

    Report with multiple where conditions

    Hi, I'm building a dynamic where clause for my report based on some selections made on a form by users. I cant get the syntax right. I have 2 combo boxes cboPM1 and cboPM2 and i need to build the following criteria e.g. ((EmpID = cboPM1 AND StatusID = 1) OR (rEmpID = cboPM1 AND StatusID = 1))...
  10. J

    ODBC Connection Error Cannot generate SSPI

    Here is my setup. Access 2010, SQL Server 2016 Std Edition On my server i have Express, Developer and Standard edition installed Users are connected though ODBC File.DSN (on a shared network drive) using Server = ServerName(IP Address)\InstanceName,PortNumber I have 50 users connected at any...
  11. J

    rs.AddNew ODBC Fail Query timeout expired

    -Frontend Access 2010 -Backend tables are in SQL Server 2017 Set rs = db.OpenRecordset("SELECT * FROM tbltable1", dbOpenSnapshot, dbSeeChanges) Set rs1 = db.OpenRecordset("SELECT * FROM tbltable2 ", dbOpenDynaset, dbSeeChanges) BeginTrans rs.MoveFirst Do Until rs.EOF rs1.AddNew...
  12. J

    Open Form to specific record - NOT WORKING

    I have DoCmd.OpenForm hundreds of places in my application but for some reason it doesn't not work properly one of my most critical forms. DoCmd.OpenForm "frmForm", acNormal, , "ID=" & Me.ID The above does not open to the record i.e. "ID", form opens to a new record. I have some OnCurrent code...
  13. J

    Calling Sql Server SP with multiple parameters

    When i execute the following as a pass-through query it works exec dbo.sp_MyStoredProc @Parameter1 = 1, @Parameter2 = 3 However i cant get this to execute in vba Dim recordsAffected As Long Set conn = New ADODB.Connection conn.ConnectionString = "MyConnectionString" Set cmd = New ADODB.Command...
  14. J

    Not Exist SQL?

    See attached picture: I need the SQL statement to select JobNo and JobCategoryID that does not have EmpRoleID 1. The attached picture displays the table with highlighted record i would need to select. I only want the JobNo and JobCategoryID, i dont want EmpRoleID in my results I think i can do...
  15. J

    Format(Date,"m/dd/yyyy") vs Short Date "m/d/yyy"

    Im having a problem retrieving records using between dates in my query where clause. I have a form with start date and end date that is passed the query. Form dates are formatted as short date "m/d/yyyy" using the date picker. query date is "m/dd/yyyy". Records between 1st and 9th is not picked...
  16. J

    DB Bloated - Compact and Repair

    Access Devs, I have a database application that has been in use for over a year. Only part of the application was used in 2016, the part that creates 80% of the data. As of Jan 1, the entire application is being used. At the end of Dec 2016 my backend file was .8g. Since Jan the back end has...
  17. J

    Multiple WHERE Clause using AND

    Fellow Access Developers, Im writing a SELECT SQL query on a table that has 2 checkboxes (Checkbox1 and Checkbox2). i need to retrieve records with the following: if Checkbox1 is False and Checkbox2 is False - select record if Checkbox1 is True and Checkbox2 is True - select record if...
  18. J

    Access VBA: Print copies of external files

    Hi access devs, Can anyone help me modify the code below to print to a specific printer (not my default printer)? Private Declare PtrSafe Function apiShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As...
  19. J

    Access/SQL Server Cal Licence

    My company is shopping for sql server, we want to migrate to in the very near future. I have a licencing question. If users have a local copy (runtime) of front end of access connected to sql server back end, do we need cal licence for each user?
  20. J

    Add Records from a Recordset to another Recordser if not exist

    Table1 ------------------ Food |Item | -----------------| Fruits | Apple | Veg | Tomato| Veg | Lettuce| Grain | Bread | Dairy | Milk | Table2 ------------------ Food |Item | -----------------| Fruits | Apple | Veg | Lettuce| Grain | Bread | How do i add records...
Top Bottom