Solved

Assigning records for review to a user in Access 2007

Posted on 2011-02-25
5
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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…

756 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