473,403 Members | 2,183 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,403 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 1442
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.