Solved

Assigning records for review to a user in Access 2007

Posted on 2011-02-25
5
392 Views
Last Modified: 2012-05-11
Hello, I am attaching a form to this question that several experts here have been helping me with over a few months.  I want to add a new feature to the form for users so that, lets say there are 100 records, user1 can be assigned 50 to review and user2 can be assigned 50 to review.  Ideally, I would like to create a new form accessed from the switchboard where an administrator can select records based on some characteristics of table Imported.  The fields I envision using for this assignment are [Year] and [Call Number] where the form can divvy up records based on a range i.e. 1999 - 2010 records go to Jon, 1998 and earlier go to Bette or by call number in a similar fashion.  One thing of note is that the user information isn't drawn from a table but rather from the following module from mvps.org:

Option Explicit
Option Compare Database

Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Function fOSUserName() As String
' Returns the network login name
    Dim lngLen As Long, lngX As Long
    Dim strUserName As String

    strUserName = String$(254, 0)
    lngLen = 255
    lngX = apiGetUserName(strUserName, lngLen)
    If (lngX > 0) Then
        fOSUserName = Left$(strUserName, lngLen - 1)
    Else
        fOSUserName = vbNullString
    End If

End Function

Currently, the user name isn't passed on to any underlying table until the user modifies a record in which case it is recorded in the imported.[Modified By] field.   If the administrator has the user names drawn from advapi32.dll when assigning records, do the experts here think an example of this form can be created?
EE-Example.accdb
0
Comment
Question by:Bevos
  • 3
  • 2
5 Comments
 

Author Comment

by:Bevos
ID: 34981847
Hi I thought my question was a little vague, so I tried to do what I could in terms of formatting.  I don't yet know enough of the programming to do much there.  In the updated file you will see a form called frmAssign. The records in the table Imported now have a field Assigned where the username should be passed after using the frmAssign.  I suppose I will need to create a filter where onLoad filter frmSearchHighlight by fOSUserName = imported.assigned.  
There are a lot of things that need to be done on this form, and I don't expect any of the experts here to answer them all, but if you can give me any help on where to start it would be greatly appreciated and I will close the question and address again with questions tailored to the remaining issues.
EE-Example.accdb
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34986039
test this

change the macro that open the frmSearchHighlight, adding Where clause  [Assigned]=fOSUserName()
EE-ExampleRev.accdb
0
 

Author Comment

by:Bevos
ID: 34994532
Hi Cap, so I should just add a filter to this the open form command for fOSUserName?  Was there anything else in the code or should I re-post for those Qs?

Thanks, Bevo
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34996981
try adding records to the table, with your username and some other usernames
then open the form see which records will display in the form.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 34996991
try adding records to the table, with your username and some other usernames
then open the form and see which records are displayed in the form.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question