Search results

  1. O

    regex validation

    I just found a lovely bit of code that allows you to do regex checking here: http://www.mvps.org/access/modules/mdl0063.htm you can use this to validate postcodes, email addresses etc. V.nice. All credit due to John Nurick Here's his code in case the link ever disapears...
  2. O

    How to check Property of a Closed Form

    I think you should be able to spin thorugh all your forms using the allforms collection but I've got a feeling you'll have to get the code to check the .IsLoaded property and if it's false load the form in order to read it's tag. Tip: you can use Application.CurrentProject.AllForms in a ForEach...
  3. O

    very basic email validation

    someone could probably do a whole lot better but here goes: Function ValidEmail(EMail As Variant) As Boolean ' Returns true if given a valid email address or Null 'setup Dim TempCheck As Boolean Dim TempCount, TempLoop As Integer Dim TestData As Variant TempCheck = True...
  4. O

    Misc Text functions

    Count lines of text: Public Function CountLines(InputText As String) As Integer Dim TempCount, NewLinePos As Integer TempCount = 0 If LenB(InputText) > 0 Then InputText = Replace(InputText, vbCrLf, vbLf, , , vbBinaryCompare) TempCount = 1 NewLinePos = InStr(1, InputText, vbLf...
  5. O

    Clipboard stuff

    Not sure who wrote the original code (if this yours PM me and I'll edit this message to give you full credit) but I've found this really useful. there are 2 functions. One to get data from the clipboard and another to put data into it. Just pop the code into a new module and away you go...
  6. O

    Reverse UK School Year

    ' given a persons date of birth and a School Year (i.e. Year 12 = Lower 6th) this function ' will report what year the person will be in that school level Function YearSchoolLevelIs(SchoolLevel As Integer, DOB As Date) As Integer YearSchoolLevelIs = Year(DOB) + 5 + SchoolLevel + IIf(Month(DOB)...
  7. O

    Calculate A Person's Age

    Hi all, I don't know if this is any better or worse but I put together a couple of functions to do the same sort of thing. These work out the age in years and months. Might be useful :confused: ? '************************************************************* ' FUNCTION NAME: Age() ' ' PURPOSE...
  8. O

    Someone has hacked the forum :(

    errr... Just had a worrying thought. Has the hole the hacker used been patched up?
  9. O

    code snippet donation

    Dear Jon, Unbelievably sorry to hear all the posts have been lost. I'm sure I (and lots of others) have bits of useful code that we'd happy to post to help replace some of the lost knowledge. Just tell us where! All the best Marc
  10. O

    Short cut to insert text

    I think you can assign macros to keys (although I've never tried it). Have a look here to get you started: http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/office97/html/makingkeyassignments.asp
  11. O

    Someone has hacked the forum :(

    scratch that. silly idea.
  12. O

    Someone has hacked the forum :(

    I wonder how much usefull info can be pulled from achive.org 's way-back-when engine?
  13. O

    Open record randomily

    you could alter the table the form is based on to include a date field which stores the date of the last time the record was opened. you could then do: DoCmd.OpenForm "FORM", , , "LastOpened < GetDate() AND ID =" & myvalue
  14. O

    Accessing an Outlook Template from Access

    I'm feeling a bit misty here but can't you specify a template in docmd.SendObject ?
  15. O

    SQL SP to Update 2 records using a value found in a completly seperate table

    OK this may be a bit of a weird one. Here are my tables: Table: Relationship PK: RelationshipID int (Indexed No Dup) FK: ContactID int (Indexed No Dup) Table: Contact PK: ContactID int (Indexed No Dup) FK: RelationshipID int (Indexed Dup Allowed) I also have following Local vars: @Contact1...
  16. O

    ServerFilterByForm Operators

    % Any string of zero or more characters. LIKE '%computer%' finds all book titles with the word 'computer' anywhere in the book title. _ (underscore) Any single character. LIKE '_ean' finds all four-letter names that end with ean (Dean, Sean, and so on). [ ] Any single character within...
  17. O

    Recommend a Word Mail Merge Method

    Hi all, can anyone recommend some code to do the following: given a SQL SELECT statement launch MS Word to start a new blank mailmerge document using the resulting data. The code needs to be able to run on a database with multiple people accessing it who don't have rights to create new tables...
  18. O

    filter a ServerFilter for Word Mail Merge

    OK this should be relatively easy but I think my brain has finally melted! I'm putting together a quick and nasty mailmerge button in my .adp to launch mailmerge in ms word. This code works fine: DoCmd.SelectObject acServerView, "vwSubscriptionContacts", True DoCmd.RunCommand...
  19. O

    Track missing records

    'ello, I know it's been a while on this question but I was seraching for something else and stumbled accross this on my way. If you Don't haave the Unmatched Query or you're writing an .adp have a look for "outer join" in the MSAccess help. There's a step by step guide how to do this manually...
  20. O

    using DoCmd.TransferDatabase to import data

    /me stares blery eyed at my posting. Whoops - I meant insert! Thanks Marc
Back
Top Bottom