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
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...
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!
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...
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?!
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
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
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...
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
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...
Hey all,
Is there any way of stopping the user accessing the code in my database? I've turned off all of the 'Display status bar' 'Display database window' etc so that they can't access the tables directly but the properties menu is brought up using the alt+enter shortcut so the events can...
Hi All,
For my A-Level Computing Project I have created a database that holds details on students in a boarding college and details of where they are at half terms/end of terms etc. For the security of this database i need to lookup the user ID from a table and then give the user specific...