Solved

Assigning records for review to a user in Access 2007

Posted on 2011-02-25
5
368 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
Comment Utility
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 119

Expert Comment

by:Rey Obrero
Comment Utility
test this

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

Author Comment

by:Bevos
Comment Utility
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 119

Expert Comment

by:Rey Obrero
Comment Utility
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 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now