Search results

  1. M

    Solved Converting txt file to xlsx

    I'm trying to take all txt files in a folder and convert them to excel files. I 'borrowed' the below code and it seems to work EXCEPT that it only does text to columns on the header line. (Be gentle - I so appreciate all your expertise, but I'm really not great at this... Any help is...
  2. M

    Importing data from excel with file name

    I have this code which appropriately imports all files from excel in a folder with a certain wildcard name: Private Sub Command4_Click() Dim ImportDir As String, ImportFile As String ImportDir = "G:\CCC\Payer Relations-Contracting\Payer Data Files\Connecticare\" ImportFile = Dir(ImportDir &...
  3. M

    Solved Access open error "Could not lock file"

    I have a database with about 5 users - all have personal front ends, linked to the shared back-end table database. Everyone is able to access fine, except one - who gets the error "could not lock file" on opening. I do NOT want her to try and open in Exclusive mode - as the fix code to the...
  4. M

    Solved Attaching file to outlook email from Access

    Hi folks! I'm trying to attach a file to an outlook email from Access. However, I don't always have the exact file name. How can I call out the filename to include anything starting with something? FileName = "G:\CLASP\CLASP Tools\RG_" & [Guideline] & ".docx" I want it to pull anything in...
  5. M

    Solved VBA access to outlook email with table: aligning table cells

    Hi! I am pulling some data from Access to send as table (table without borders). Private Sub Command71_Click() Dim strQry As String Dim aHead(1 To 2) As String Dim aRow(1 To 2) As String Dim aBody() As String Dim lCnt As Long Dim rst Dim strEmailto As String...
  6. 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...
  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

    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...
  11. 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...
  12. 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:
  13. M

    How to bypass VBA error message

    I have a code which on pressing command button, it opens email and attaches a file from my computer. If it does not find the file, I get a halt error, "cannot find this file". Is there a way to build into the code to continue to sending the email even if the file is not found/attached...
  14. M

    Basic VBA to open report based on field

    I thought this would be a very basic VBA code. I'm trying to open a report, using a command button, based on a mutual field in the report and on the open form [positionID]. While it does open the report, it is not limiting the report to that specific [positionID]. ---------------------...
  15. M

    Attaching TWO reports into email

    I've probably exceeded my questions for the week, and maybe my brain is just fried (thank goodness its Friday!).... I have the attached code which sends an email from my database via Outlook. Where/how do I go about attaching two reports from my database to the email as pdf files? -------...
  16. M

    Unbound field in form

    I have created an unbound field in my form. It is to update to a date when a macro runs. It works great, but when I exit the form, the date disappears! :banghead:
  17. M

    Open Form with no existing record

    I am trying to create a command button to open another form, "CoMorbidities" with mutual MRN#. If the MRN# does not already exist in the "Comorbidities" form, I need to add the MRN# to that form/table based on the same MRN# that is on the open form where the command button is. (Me.MRN#)...
  18. M

    AfterUpdate not working with auto-populated field

    I have a field [HiringMgr] which is auto-populated based on another field. This field is also a drop down field for cases when it doesn’t auto-populate. [HiringMgr] field also has an after-update command to do something else. This command does not “happen” when the field is auto-populated...
  19. M

    Email to include Outlook signature

    I have a code to send an email through Outlook looking up emails from a table. Is there a way to include my Outlook signature? ----------- Private Sub Command272_Click() Dim strFileName As String Dim rst As DAO.Recordset Dim strEMailTo As String Set appOutLook =...
  20. M

    Pulling emails into VB code from table

    Hi! I have a command button built with code to send an email, as such: ----------------- Private Sub Command271_Click() DoCmd.SendObject , "", "", "testemail@here.org;test2@here.org", "", "", "New Hire Offer Made", "Good afternoon," & vbCrLf & vbCrLf & "Attached please find the CV for a...
Top Bottom