Search results

  1. G

    Reading control value from Public Function in Module?

    Many thanks to both of you. The issue turned out to be an error in the control name (calling the function with the wrong control variable) from the control's On Click event. It works like a charm now. Thanks again!
  2. G

    Reading control value from Public Function in Module?

    Hello Access-Programmers, I am trying to read the value of a control on an open form from a Public Function in a Module with no luck. I suspect the issue is syntax. Public Function MyFunction(varFormName As String, varControlName As String) If Forms(varFormName).Controls(varControlName) =...
  3. G

    Referring to Forms objects using variables

    Thanks, that is exactly what I needed! (Without the SetFocus there is error 2185, You can't reference a property or method for a control unless the control has the focus.) Because the user clicks a Date Stamp button next to the memo field, the button has focus when the function executes...
  4. G

    Referring to Forms objects using variables

    Hello Access-Programmers, I have a simple date stamp that works great in a private sub within a form. (error handling removed for clarity) Private Sub btnDateStamp_Click() ' UserInit is global variable Me!Notes.SetFocus Me!Notes = Chr$(13) & Date & " - " & Time() & " - " &...
  5. G

    Autoresize column widths in Split Forms?

    I had the same problem. What worked for me (Access 2010 Split Form) was to resize all the columns (by dragging the right edge of the column header) the way I wanted, then right click any column header and select "Hide Column." Hide any column, click "Ok" then right click again on any column...
  6. G

    FindFirst Error 3251

    This is generating error 3251. What is amiss here? Thanks for looking at this. Private Sub btn_Click() Dim db As DAO.Database Dim rstTable As DAO.Recordset Dim VarID As Integer Dim varString As String Dim varString2 As String Set db = CurrentDB Set rstTable = db.OpenRecordset("tblTable")...
  7. G

    Repeating Outlook Sessions

    Is this what you had in mind? Function SendEmail() On Error GoTo SendEmail_Err Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem ' Create new instance of Outlook Set OutApp = CreateObject("Outlook.Application") ' Create new Outlook Email item Set OutMail =...
  8. G

    Repeating Outlook Sessions

    I thought I would repost this "fixed" Outlook function in case others need a solution. (Thanks for the fix spikepl) Function SendEmail() On Error Resume Next ' Set OutApp = GetObject(, "Outlook.Application") ' See if outlook is open Set OutApp = CreateObject("Outlook.Application") ' Create...
  9. G

    Repeating Outlook Sessions

    Thank you sir! That solved the error 462 issue. A comma... who knew... you did Thanks again
  10. G

    Repeating Outlook Sessions

    Hello Access-Programmers, I can open Outlook one time when running the code below. Subsequent attempts generate error 462 which I have captured and requested user action. This method seems a bit sloppy. Function SendEmail() On Error Resume Next Set OutApp = GetObject(...
  11. G

    Importing Modules

    Thank you for getting me started. Here is where I am now. This part works great counting, reading and listing the CurrentProject's VBA Module's names. ' Use the "CurrentProject" collections to get the counts of objects (This db) Dim varCurrentModuleCount As Integer Dim n1 As Integer...
  12. G

    Importing Modules

    Hello Access-Programmers, I am using Access 2010 and trying to import objects (not tables) from another (closed) .accdb into an open .accdb. I can count the module objects with CurrentProject.AllModules.Count. I need to read the modules names so I can try to import them using...
  13. G

    Updating data between database versions

    Thank you for considering my dilemma. Splitting the db is a solution that will make my job much easier. The end user is in another state and is a single chair that has limited ability when it comes to file manipulation within the Windows file system. My goal is to provide that user with an...
  14. G

    Sum row cells value

    Excel cell formula =Sum(A1+C1+D1+Z1) Or =Sum(A1:Z1) VBA Name cells or range and write VBA to sum them.
  15. G

    Updating data between database versions

    I have been asked to add features (and fields) to an existing database containing private medical data. The idea is to add features to the empty database, test it with fake data, purge the fake data and deliver it to the user in another state with a simple update button. The Access 2010 database...
  16. G

    Show / Hide Document Tabs ribbon

    This subroutine works for the “Ribbon” and the “Status Bar” but not the “Document Tabs.” What is the Document Tabs bar name in Access 2010 or is File > Options > Current Database > Display Document Tabs the only method to show or hide the document tabs bar? If the latter is true can the Options...
  17. G

    Hello from Florida, USA

    Results from this site assisted me several times when I used Google to search VBA issues. So by joining, I hope to gain further insight and maybe even help someone else. I created and modified several Access databases and Excel solutions at work and for friends, however, I consider my...
Back
Top Bottom