Recent content by EHS

  1. E

    Validation not working

    Thanks John! That did the trick.
  2. E

    Validation not working

    Hi there I've have a form used to input/edit people data. The form has an exit/save button which performs various tasks via the click event. One of the tasks is calling a subroutine to validate some of the form's fields (subroutine attached). The UPN validation works (the first check), but none...
  3. E

    Pre-populate form fields

    Thanks for your help. I found the problem - a stupid mistake on my part. Happy new year!
  4. E

    Pre-populate form fields

    Hi There I'm trying to pre-populate some fields on a form using the following code in the on activate event: With Me.CreatedBy .Enabled = True .SetFocus .Value = tmpClass End With With Me.Location .SetFocus .Value = tmpLocation End With...
  5. E

    Referring to a form field in the where clause

    Thanks vbaInet and MStef. [Forms]![FormName]![FieldName] in the query worked!
  6. E

    Referring to a form field in the where clause

    it's bound
  7. E

    Referring to a form field in the where clause

    I'm trying to construct an sql statement that will filter the contents of a field (from a query), based upon the contents of another field on the form. The statement works if I put a string in the where clause instead of the filter field name, but I don't know how to specify the field name in...
  8. E

    List form not linking to detail form

    Thank you very much. That has been a great help
  9. E

    List form not linking to detail form

    Sorry about that. I've consolidated them into 1 database.
  10. E

    List form not linking to detail form

    I've produced cut down versions of the databases, with code to pull up the detail form only on the PupilCode field. Thanks for this
  11. E

    List form not linking to detail form

    If I open the detail form on it's own, it does display all records.
  12. E

    List form not linking to detail form

    Thanks again. I have read the link properly this time, and used 'DoCmd.OpenForm "People Details", , , "PeopleCode = " & Me.PeopleCode'. I didn't get the Data type mismatch error, but I didn't get the required record either. The record displayed was the (yet again) first record.
  13. E

    List form not linking to detail form

    Thanks for that vbaInet. I tried "Str(PeopleCode) = '" & Str(Me.PeopleCode)", but I got the same result. If I don't use str() I get the error message 'Data type mismatch'.
  14. E

    List form not linking to detail form

    Hi there I have a form that lists people. Each field has a click event that opens a people detail form using docmd.openform "PeopleDetail", , ,"str(PeopleCode = " & str(Form!PeopleCode). The detail form opens but always displays the first people record. PeopleCode is an AutoNumber, hence the...
  15. E

    Reading new outlook emails

    Hi there. I managed to get my code working. I hope this is useful. Function CheckEmail2() Dim myOutlook As Outlook.Application Dim myNamespace As Outlook.NameSpace Dim myEmail As Outlook.Items Dim myItems As Outlook.Items Dim myItem As Object Set myOutlook = New...
Top Bottom