Results 1 to 11 of 11
  1. #1
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75

    Re-freshing form

    Hi,
    I have a form which is opened by many users using a UserPass form.. So the username is used to save the data under the particular person's name.
    Now suppose a particular person updates 7 orders is it possible to view the same thing in the same main form....
    and also that it refreshes as the persons updates another and then the other.. so it keeps increasing..
    I want it to be viewed on the form itself.

  2. #2
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by hitesh_asrani_j View Post
    Hi,
    I have a form which is opened by many users using a UserPass form.. So the username is used to save the data under the particular person's name.
    Now suppose a particular person updates 7 orders is it possible to view the same thing in the same main form....
    and also that it refreshes as the persons updates another and then the other.. so it keeps increasing..
    I want it to be viewed on the form itself.
    Yes, all you have to do is create a query for the table in which the data is being entered, set the criteria to the employee's user's name and bound the form to the query. This way, only his records and subsequent entered records are displayed.

  3. #3
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    can this query be used in the Form as a text or a label because i cannot use the button to show the number of orders the person is worked on that day....

  4. #4
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by hitesh_asrani_j View Post
    can this query be used in the Form as a text or a label because i cannot use the button to show the number of orders the person is worked on that day....
    Are you saying you just want to show the tally of the records entered by the person? Give me description on what you need

  5. #5
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    I want to show the number of orders a person has done on that particular day till that time...

    So once he updates a new Record the nnumber should also change with it...

    so something like "=count(order numbers)" like we do in ms excel


    Thanks in Advance

  6. #6
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by hitesh_asrani_j View Post
    I want to show the number of orders a person has done on that particular day till that time...

    So once he updates a new Record the nnumber should also change with it...

    so something like "=count(order numbers)" like we do in ms excel


    Thanks in Advance
    You can set up an unbound text box in the form to receive this data. In the after update event for the form, use a DCount function to count the data based on the criteria and have the value inputted onto the unbound text box.

    Lets say your unbound text box's name is "OrderNumbers". So, in the after update event of the form, put the following:
    Dim sUser As String

    sUser = Me.UserName 'subsitude this for the field where the user name is located
    Me.OrderNumbers = DCount("*","tbl_YourOrderTable", "UserName = '" & sUser & "' And OrderDate = #" & Date & "#") 'subsitude "tbl_YourOrderTable" with the name of your table and "UserName" with the field name of the user's name field

  7. #7
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    So suppose my user name is already saved under GetUser() can i use that?

    and for the date i can use the Date() function?

  8. #8
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by hitesh_asrani_j View Post
    So suppose my user name is already saved under GetUser() can i use that?

    and for the date i can use the Date() function?
    yes to all

  9. #9
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    I tried everything you said, but it is not working :'(

  10. #10
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    Dim sUser As String

    sUser = "GetUser()" 'subsitude this for the field where the user name is located
    Me.Text239 = DCount("[Order Number]", "[Table]![Data]", "Agent = '" & sUser & "' And OrderDate = #" & "Date()" & "#")
    End Sub

  11. #11
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    I somehow solved the issue..
    I created a query which actually updates a Report...
    This report is generated when the user clicks on the logout button which show him/her how many orders she has worked on..

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums