Search results

  1. D

    Putting data in to a set excel file

    Method or data member not found - Doh!
  2. D

    Putting data in to a set excel file

    Thanks I get the following error: Subscript out of range Code added: Sheets("Sheet1").Activate
  3. D

    Putting data in to a set excel file

    I am trying to open a pre-saved excel file then put data in to it from an SQL query. what's actually happening with the code below is that it opens the pre-saved excel as intended, but the it opens a new workbook and pastes the data in to it. How can I paste the data only in to the pre-saved...
  4. D

    Using VBA to change the selected Excel tab

    Because of the way the application has been built I don't believe that method is as useable as I would like
  5. D

    Using VBA to change the selected Excel tab

    I thought it would be easy, I must me missing something simple. Im using the below to populate data in to excel, once the data is in I want to select the 'ID' tab and put a test comment in cell C5. Public Sub ExportQuery(ByVal Query As String, ByVal ShowToUser As Boolean, ByVal TabName As...
  6. D

    Looping through list box controls

    @Arnelgp - Brilliant!!! This has now got the data going in to its own tabs, thank you very much. To add a curve ball, how would we add it all on to a single excel sheet, for each loop it adds the mismatches to the corresponding ID in column A @CJ_Long - Thank you for the comment, the code was...
  7. D

    Looping through list box controls

    Morning All Im seriously confusing myself What my code currently does: The code checks the values in 3 listboxes, the user adds items to the list box to check, the query then looks for data associated with each item and exports it to a new excel if it does NOT match. It will then check the...
  8. D

    Using a query to group

    I am trying to group together a list of manager. The query works, its showing the managers name 3 times (3 people also on the team). I am clearly grouping incorrectly and would appreciate some help. My Code: SELECT DISTINCT [_tbl_Structure].Supervisor...
  9. D

    Pulling data depending what form is open

    Thank you Took 5 minutes to understand it, works a treat. Thank you
  10. D

    Updating two tables from one form

    Is the ID for each individual the exact same for each individual in the primary table? If so the code I put in my last reply would work
  11. D

    Updating two tables from one form

    Does the employee have a unique identifier, such as payroll number etc? I guess not but the question. You would have to update your SQL part of the code to something like: strSQL = "SELECT * FROM tbl_daysoff WHERE Payroll = '" & EmployeePayroll & "'"
  12. D

    Pulling data depending what form is open

    Thank you for taking the time to reply Can you explain in a little more detail please as this is a tad over my head at the minute, sorry.
  13. D

    Pulling data depending what form is open

    Thank you for this - I have tried it but its currently throwing out the same error I was previously getting which was: Microsoft Access cannot find the referenced form 'frm_Manager_Stats_NEW_Appts'. This form does exist - Baffled
  14. D

    Pulling data depending what form is open

    Morning I have multiple userforms - From all the form users can click a button that will open another form called frm_complaints_manager When the frm_complaints_manager form opens I want it to detect which form is open and pull some data from it. I had no idea how to achieve this so came...
  15. D

    Counting based on dates

    Afternoon I have a query and need to achieve the following: - Count number of calls from agents from tbl_Genesys_Weekly - Count number of times agents appear in tbl_ReferralsYTD based on the week commencing date from tbl_Genesys_Weekly + 7 So far I have this and its not going to plan at...
  16. D

    Converting query builder SQL to VBA

    I have solved it: With CurrentDb.CreateQueryDef("", "SELECT [_tbl_Structure].[User Name], tbl_Genesys_Daily.Field7, tbl_Genesys_Daily.Field12, Count(tbl_plans_yesterday.[User ID]) AS cntUID, ([field7]+[field12]) AS calls, Format([cntUID]/[calls],'Percent') AS eff, [_tbl_Structure].Supervisor...
  17. D

    Converting query builder SQL to VBA

    Morning I am trying to put query builder SQL in to VBA but struggling. Current code is: SELECT [_tbl_Structure].[User Name], tbl_Genesys_Daily.Field7, tbl_Genesys_Daily.Field12, Count(tbl_plans_yesterday.[User ID]) AS cntUID, ([field7]+[field12]) AS calls...
  18. D

    Trying to calculate data from two tables

    I am using query builder to pull some figures. The following shows the data I need: SELECT [_tbl_Structure].[User Name], tbl_Genesys_Daily.Field7, tbl_Genesys_Daily.Field8, Count(tbl_plans_yesterday.[User ID]) AS [CountOfUser ID], [field7]+[field8] AS calls FROM (_tbl_Structure LEFT JOIN...
  19. D

    Morning All

    Morning I am Dave, from the UK Still learning Access and have used this site a while to read up on posts that have helped me so thought it was time to get stuck in myself and post my self, as well as answer.
Back
Top Bottom