Recent content by Aubrey

  1. A

    Filter forms

    Hey Ian, No its not based on a query...it just takes the entries from a table. I was wondering if there was a DoCmd.Filter function that I could use. The text box has the teachers initials in it i.e. CC which is how they wanted it Aubrey
  2. A

    Filter forms

    Dear all, I have a database for authorising absences from a sixth form college. The student fills in a form and then the housemaster either authorises or declines. When a form has been authorised it no longer needs to be seen so I want to filter these out on the form load. So can anyone...
  3. A

    DLookup

    No problem...cheers for helping :)
  4. A

    DLookup

    i think i have it sorted now...i've used a replace function to remove the ' from the name and it now works! and no i didn't write the module...i found it on the internet...i've only been programming for less than a year so i'm not that good yet!
  5. A

    DLookup

    that wouldn't work though as the username is taken from the login details so i can't change the name on the system. how drastic are your changes?
  6. A

    DLookup

    i went into beta testing today and this came up...so basically i'm finished apart from this...whys that?
  7. A

    DLookup

    that gives me an error message when i open the form =S error message- "you cancelled the previous operation"
  8. A

    DLookup

    yeah the module is... Option Compare Database Option Explicit Private Const UNKNOWN = "(Value Unknown Because System Call Failed)" Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Public UserID As String Public...
  9. A

    DLookup

    nope...that just takes username as username. username has been found using a module to find the login name of the currently logged in user. any other ideas?!
  10. A

    DLookup

    Dear all, In my project I have this line of code- strRole = Nz(DLookup("[Role]", "tblStaff", "[UserID] ='" & UserName & "'"), "") It works fine until someone has an ' in their name...can anyone tell me what to do about this? Thanks Aubrey
  11. A

    Check if UserName is in UserID field in table

    I have a module (GetCurrentUserName()) that retrieves the ID of the currently logged in user. I also know that I need to use a DLookUp function...I just want to know the line of code that I need. Thanks
  12. A

    Check if UserName is in UserID field in table

    Hi all, I have created a database that keeps track of students whereabouts during half term, end of term holidays etc. There are five house in the college but I am only making it for one house at the moment...subsequently there are students who whouldnt be allowed to access the system. I...
  13. A

    DoCmd.PrintOut

    Hi All, I have a button on a form that should, when pressed, save the form and print it out. However at the moment it prints out all forms. I was wondering if anyone could tell me the code to print out the current form only? Thanks in advance James Aubrey
  14. A

    DLookup Function

    As I said...I'll be back...same question basically... This works fine as long as the user is in the staff table. Any other student reuturns a null value from this line: strUser = DLookup("[Role]", "tblStaff", "[UserID] = UserName") The I get an error message saying 'invalid use of null' and...
  15. A

    Stop user accessing code...

    Thanks a lot...all sorted now Aubrey
Back
Top Bottom