Search results

  1. M

    Solved Saving Query to Excel and Naming Worksheet

    Thank you both! That did it! Private Sub Command146_Click() Set dbs = CurrentDb Set rsQuery = dbs.OpenRecordset("Totals by Practice") Set excelapp = CreateObject("Excel.application", "") Dim strSheetName As String strSheetName = Format([attribution month], "mmm-yyyy")...
  2. M

    Solved Saving Query to Excel and Naming Worksheet

    I'm sorry - this is a little over my head. Can you help with what you mean? Or give me an example? Thanks Gasman!
  3. M

    Solved Saving Query to Excel and Naming Worksheet

    That seems to be OK - it works if I put in a name, i.e, targetworkbook.Worksheets.Add.Name = "New Sheet Name" It is not liking targetworkbook.Worksheets.Add.Name = [attribution month]
  4. M

    Solved Saving Query to Excel and Naming Worksheet

    I'm trying to save a query to excel, which I am able to do just fine. I'd like to assign a new tab (worksheet) to the excel sheet. Got that as well. Where I'm struggling is trying to NAME the excel tab/worksheet the name of a field on the form I am running the code on. So if in my form the...
  5. M

    Create VBA for opening and replacing range of cells in Excel Worksheet

    Thank you David! I tried the above. I doesn't seem to like: If .Range("I3:I500").Replace("CHL", "", xlPart, xlByColumns, False)
  6. M

    Create VBA for opening and replacing range of cells in Excel Worksheet

    Thank you David! I tried the above. I doesn't seem to like: If .Range("I3:I500").Replace("CHL", "", xlPart, xlByColumns, False)
  7. M

    Create VBA for opening and replacing range of cells in Excel Worksheet

    So I am taking data from a query "CHL" and pasting it into an Excel file. I got that to work fine. I would also like to then in Column I - remove the wording "CHL" from any cells in that range. (my code in bold below) I'm very new with VBA, so I'm sure I'm missing something obvious... but I...
  8. M

    Formatting text in field as upper AND lower as typed

    I have a standard text field in a form. When I type the text, it automatically converts it to ProperCase. (I.e., JRoss becomes Jross.) I know how to format to all upper or lower case, however, I can't for the life of me figure out how to have it read exactly as typed! Thoughts? Michele
  9. M

    Some database functions not working depending on which computer

    Why would some command buttons work on my computer, but not on another on a shared network drive? Command button to open report (written in VBA), and the "Not On List" function works fine on mine, but not on my colleagues. We had IT re-install Office Suite on her computer and still no change...
  10. M

    Updating a field in parent form from sub-form

    Ahhhhh... thank you DB guy!
  11. M

    Updating a field in parent form from sub-form

    I am trying to update the background color of a field in my sub-form's parent form. ------------- Private Sub Combo23_AfterUpdate() If Me![Status] = "Pending: Waiting for Authorization" Then Me.Parent.OverallStatus.BackColor = QBColor(6) End If End Sub ---------------- It works by...
  12. M

    Sequentially numbering records in a query

    Got it! I created a sub query with the criteria and then used the formula! Thank you all!
  13. M

    Sequentially numbering records in a query

    RowNum: DCount("[ID]","[tableName]","[ID]<=" & [ID]) This works, except if I have a criteria in the query, the RowNum is not starting at "1".
  14. M

    Sequentially numbering records in a query

    Thanks DB Guy. There is a unique ID for each record. Not sure exactly how I would do what you suggested. I tried this in the query but does not accurately work: RowNum: DCount("[ID]","[tableName]","[ID]<=" & [ID])
  15. M

    Sequentially numbering records in a query

    I can't seem to find an answer to this, if there is one. I am trying to assign a sequential number to each output query row. i.e., ID Name 5 Bob 8 Tom 3 Joe I want: ID Name 1 5 Bob 2 8 Tom 3 3 Joe Has anyone found a way to do this...
  16. M

    Calendar/Appointment database

    In the private sub PopulateCalendar(): 'ADezii 'NOTE: Will work in the UK (United Kingdom) and other European Nations 'strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear) Is this what could be causing my days of week to be off - if I am using this in U.S.? (i.e., my calendar shows...
  17. M

    Calendar/Appointment database

    Hi Gasman, I'm using this calendar tool (I've modified and amplified). Thank you for sharing! (The week starting Monday one). I've noticed though that the day of the weeks are off. (i.e., 2/14/19 is listed in the calendar view as a Tuesday (should be Thursday). Any thoughts on how to modify?
  18. M

    Extracting data between two commas

    I've used left and mid strings before, but someone can't get a handle on this one! DOE, JANE, MD I'm trying to just get the first name (Jane) (the text between the two commas). Any help would be appreciated! :banghead:
  19. M

    Calendar/Appointment database

    Hi Gasman, I just came across this database template and its wonderful! I started to modify based on my needs, but noticed that the calendar days are off. On the calendar form - for example - Today 2/12 is listed as Sunday. Wouldn't have a clue as to how to modify that. Any thoughts? Thanks...
  20. M

    How to bypass VBA error message

    That did it DBGuy! Thank you both so much!
Back
Top Bottom