Search results

  1. c_smithwick

    On Tab vs. On Exit

    You also need to consider how your subform is going to "know" it's on the last record. Below is the syntax for what you need. Private Sub Field1_KeyDown(KeyCode As Integer, Shift As Integer) 'assumes your control is named Field1 If KeyCode = vbKeyTab Then 'do something End If End Sub
  2. c_smithwick

    Defaulting a "Medium Time" field to be "p.m." instead of "a.m."?

    Re: Defaulting a "Medium Time" field to be "p.m." instead of "a.m."? Put the following in a standard module: Public Function checkTime(strInput As String) As Date Dim intHour As Integer If InStr(1, strInput, "AM") > 0 Then checkTime = Format(CDate(strInput), "hh:mm") Else intHour =...
  3. c_smithwick

    On Tab vs. On Exit

    What are you trying to accomplish with this exactly? Are you running data verification on the fields with your subroutines. If you want your users to be able to opt out by clicking off field with the mouse then why have the functionality in the first place? Rather than figure out how to...
  4. c_smithwick

    Left to Right Section Repetition

    You might need to work with a sub report in your detail section. Primary report group by address, no columns in page setup, sub-report (inserted in the primary report's detail section), group by address but dont show the group header and 3 columns in your page setup. You will probably have to...
  5. c_smithwick

    Assign a Row Number

    Technically yes, it does go against normalization but, in your case it seems you are working with already existing data and need to restructure it for a specific use. If you are designing a database from scratch, with considerations as to how best to store data and subsequently manipulate it...
  6. c_smithwick

    Assign a Row Number

    Make a new empty table with four fields: ID (long), NAME (Text), ADDRESS1 (Text), ADDRESS2 (Text) and put the following Subroutine in a module. Run the Subroutine and it will pull all of your data from the first table into the new one Public Sub makeNewTable() Dim rstOriginal As...
  7. c_smithwick

    Help! VBA Recovery

    Happens to me more often than I would like. Only way to prevent code loss is to compile and save frequently and when you have a module completed, export it so you can reimport it into a new database if you are forced to start over.
  8. c_smithwick

    Left to Right Section Repetition

    The following will hook you up nicely http://office.microsoft.com/en-us/access/HA011565341033.aspx
  9. c_smithwick

    Increment temp tables

    On another note, for your future reference, creating and deleting temp tables leads to some serious database bloat even in a short time period. I have resolved a similar problem myself by declaring a user defined type in VBA to hold the record's data and perform operations with the data before...
  10. c_smithwick

    Fuzzy Matching

    Thanks for your generosity - this definately sounds worthy for inclusion in my resources bag for future use. Can you send me the Office 2000 versions at c_smithwick@cox.net And also to charles.smithwick@navy.mil
  11. c_smithwick

    Please Help - VBA Access & MapPoint

    Found a typo. Change Set objDataSet1 = objDataSets.ImportData(zDataSoure, , geoCountryDefault, , geoImportFirstRowIsHeadings) to Set objDataSet1 = objDataSets.ImportData(strDataSource, , geoCountryDefault, , geoImportFirstRowIsHeadings)"
  12. c_smithwick

    Need Help on VBA code

    Sub ImportExcel() Dim strSpreadsheet As String Const strImportDir As String = "C:\Import\" strSpreadsheet = Dir(strImportDir & "*.xls") ' Will return the name of the first spreadsheet file in the directory DoCmd.TransferSpreadsheet acImport, 8, "Table MAIN"...
  13. c_smithwick

    Please Help - VBA Access & MapPoint

    Try a variant of the following: Sub mapData() Dim objApp As New MapPoint.Application Dim objDataSets As MapPoint.DataSets Dim objDataSet1 As MapPoint.DataSet Dim objDataMap1 As MapPoint.DataMap Dim strDataSource As String Dim lColorRange As Long objApp.Visible =...
  14. c_smithwick

    converting monthly data to weekly

    'The following assumes two tables: '#1 "tblMonthData" with three fields ' Customer (type long integer) ' DateFld (type Date/Time) should not name this field 'Date' as that is an Access reserved word ' Qty (type long integer) '#2 "tblWeekData" with five fields ' Customer (type integer)...
  15. c_smithwick

    How to call a function on start up

    To run at databse startup, create a macro named "autoexec". You will have one action in your macro - "RunCode" and the function line will be ListFilesToTable("C:\Data", , True) To run this from a form, in the "OnClick" event of whatever button you want to push, add the line...
  16. c_smithwick

    Question Gather Information

    You can't do it from Access, but you can do it from Outlook. Put the following in the "ThisOutlook Session" module of the Outlook Inbox you will be monitoring: Option Explicit Public db As DAO.Database 'Must have Microsoft DAO 3.6 Object Library referenced Public WithEvents outItems As...
  17. c_smithwick

    Really Stupid Question

    When you select the runcode macro command, you input the name of the FUNCTION not the name of the MODULE.
  18. c_smithwick

    Enumerate modules's functions?

    Make sure you have the following added to your references: "Microsoft Visual Basic for Application Extensibility 5.3", "Microsoft Scripting Runtime" and "Microsoft Access 11.0 Object Library"
  19. c_smithwick

    Enumerate modules's functions?

    Insert the following in a module and run the function "ProjectDocumentor" from a macro. This will create a table containing all of your forms, their controls and functions associated with events on the forms as well as which modules the functions are in. It will document each function in your...
  20. c_smithwick

    Hi, Been looking around a while.

    Welcome! In my experience, there are a great deal of employed IT "professionals" out there who can have some pretty dodgy actual experience. Don't feel intimidated by your "newness" - you can excel in your career if you study and learn to solve things without too much reliance on the "old...
Back
Top Bottom