Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 57
  1. #16
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    hey robeen, thanks a million for your help on this, just got the thing running.

    I am getting the search results in Detailform worked by the agent on the previous day however i have to tab through every single record, is there a way the form can display all the records at a time?

  2. #17
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    In the DetailForm -> Design View -> Property Sheet -> Format . . .

    Change the 'Default View' to 'Datasheet'.

    That should show you all the records in one sheet.

    Let me know if that helps . . .
    Last edited by Robeen; 09-16-2011 at 11:25 AM. Reason: Improving clarity of instructions.

  3. #18
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    Hi robeen,had 2 problems

    1)When i search the records using the Date field in the Origninal form, as i have given access the option to chose the primary key , it makes another new record in the DB when i search with date field.

    2)when i filter the search records using the Date and with a specific Agent name field in original form, the detail form displays all the agents orders.

  4. #19
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Was the immediate issue - of showing all the records - solved?

  5. #20
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    no it didn't, the detail form still shows records of all the agents

  6. #21
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    You said:

    is there a way the form can display all the records at a time?

    I told you to change the form property to Datasheet. Did you do that? And did it display multiple records on the screen at the same time?

    I know that you are getting ALL records right now - but I want to know if you changed the sub form to Datasheet - and if that is showing multiple records on one screen - like Excel . . .

  7. #22
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    I changed the form property to Data sheet, and it's showing multiple records on one screen like excel

  8. #23
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Ok. So what you need next is to make sure that when you open your second form, only the records for the current Agent are displayed - right?

    On your first form - do you have a field with the current Agent's Name?
    Or do you have any TextBox on your first Form into which an Agent can put his name in?

    In order to open the second form with only one Agent's information, you have to pass the Agent's identifying info [name, AgentID . . .] to the second Form.

    Previously, you wanted to pull up the DetailForm by Date.

    You will have to change that to pull up by Agent and it will look something like this:

    Code:
     
    DoCmd.OpenForm "DetailForm", , , "[AgentNameOnFirstForm] = '" & Me.[AgentNameOnSecondForm] & "'"
    For this to work - you must have a TextBox on your First form called 'AgentNameOnFirstForm' [you can change the name] - and a TextBox on your DetailForm called 'AgentNameOnSecondForm' [you can change the name].

  9. #24
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    i have a combo box with the agent names in it. so when an agent wants to retrive his previous day worked orders, he will give his name and the date in the Date and agent field?

    so basically i want to pull up orders by the agent and the Date Field combinedly

  10. #25
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I have put a post out already asking how to pass two parameters to the 2nd Form.

    Let's see what help we get there.

    What you can do in the meantime, is to try & get the DetailForm working with the Agent Name so that only the selected Agent is displayed on the DetailForm. Have you been able to do that?

    Also - if your 2nd Form is based on a Query rather than a table, you can filter the query for yesterday's Date.

    That way, when the DetailForm opens - only one Agent will be displayed and only yesterday's data will show.

    Will that work for you?

  11. #26
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    yeah tht will work for me and When i search the records using the Date field in the Origninal form, as i have given access the option to chose the primary key , it makes another new record in the DB when i search with date field can this be stoppeD?

  12. #27
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Karan - I don't understand why a new record is being created.

    Make a New Post with that question.

    Someone might be able to answer that for you.

    It will be better that way!

    All the best!!

    If you don't get help there - post here again & I'll try & help!

  13. #28
    karanvemuri is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    56
    thanks a mil for all your help robeen, and can you pls let me know when you have an answer on how to pass two parameters to the 2nd form

    Have a great day

  14. #29
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I will let you know!

    Don't hesitate to contact me through this thread if you need more help!

    All the best!

  15. #30
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Hi Karan,

    I was told that all that is required is to add the 2nd criteria to the end of the first one in the DoCmd statement.

    I tried this in my test database & it worked.

    Code:
     
    Dim strCriteria As String
     
    strCriteria = "[AgentName] = '" & Me.[AgentName] & "' "
    strCriteria = strCriteria & "AND [OrderDate] = #" & Date - 1 & "#"
     
    DoCmd.OpenForm "EOQ_CD_Datasheet", , , strCriteria
    Let me know if it works for you - or if you need more help!!

    Robeen

Page 2 of 4 FirstFirst 1234 LastLast
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