473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to show the logged in users in input form

Hi I have an Input form based on query.
I have 4 users and 2 administrator. I want to show the name of data entry operator with each entry OR want to display the name of logged in users in input form.

Please assist me.

Thanks
Oct 24 '14 #1
3 1441
dsatino
393 256MB
paste this into a module and call the function when you need it.



Expand|Select|Wrap|Line Numbers
  1. Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
  2. "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  3.  
  4. Public Function fOSUserName() As String 'Returns the network login name
  5.     Dim lngLen As Long, lngX As Long
  6.     Dim strUserName As String
  7.  
  8.     strUserName = String$(254, 0)
  9.     lngLen = 255
  10.     lngX = apiGetUserName(strUserName, lngLen)
  11.  
  12.     If (lngX > 0) Then
  13.         fOSUserName = left$(strUserName, lngLen - 1)
  14.     Else
  15.         fOSUserName = vbNullString
  16.     End If
  17. End Function
Oct 24 '14 #2
Hi,
It will capture the Network Users...But I want to display the users created in a table of database. I created a login form and users can login by putting user names and password saved in tbluser.
Please advice
Oct 25 '14 #3
twinnyfo
3,653 Expert Mod 2GB
You may want to look at this article on User Permissions and Custom Menus. It may be a bit more involved than what you are initially looking for, but you should be able to pick and choose certain parts that should work for you.

Standing by to assist if you need anything else.
Oct 27 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marco Alting | last post by:
Hi I'm trying to create an input screen that allows users to create a hierarchical structure as the one below, but have no clue where to start or how to construct it. Can anyone help me out...
1
by: Marcin Zmyslowski | last post by:
Hello all! I want to create a page in ASP language which gives me information about currently logged users. I thought to do it by this way: when somebody will log in to page, there will be a...
4
by: intl04 | last post by:
How do I create a data input form in Access that is external to the Access database to which it's connected (if that's possible, which I believe it is)? For example, if someone clicks on an Access...
20
by: Greg | last post by:
I'm fairly new to access (using 2002) and am setting up a DB for work. along with each record the user also needs to make a flow diagram (previously, these reports were composed in word and they...
3
by: C. Cleophas | last post by:
Hi there, I have the following Access-related problem. Given a set of problems, which have several alternatives (possible solutions) and criteria for these solutions, I need to give values for...
1
by: Rein Petersen | last post by:
Hi All, I'm just playing around with Windows Forms (haven't had too much use for them otherwise) and I'm just trying to make sense of how an event in one form (like a user-click) can spawn a new...
0
by: MattB | last post by:
Hi. I'm on my second redesign of a dynamic form I need to create and I'm looking for good examples and/or suggestions. I have a web application that is being distributed to different clients of...
1
by: Joyfully | last post by:
I and a new user of MS Access 2003, and I need help with a report created from a form. I created a form that data is inputed weekly. I created a report to display this data in putting only the...
11
by: andrewdb | last post by:
I have been working with a database that was already created by somebody else, who now no longer works here, so I cant ask any questions. None the less, there is a table 'Ascertainment' which...
13
by: snowinfo | last post by:
Hi all, any way to count the number of users i have logged into my site? any help/code appreciated, craig
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.