Hi,
You might have followed the steps in this thread:
http://social.technet.microsoft.com/Forums/en-US/8f441d97-e4f9-4e80-891b-f4f4b5fb9457/how-to-populate-a-sharepoint-2010-list-from-the-active-directory-how-to-populate-a-sharepoint-2010?forum=sharepointdevelopmentprevious
What if you publish this form first, then test it in that library, will this issue still exists?
You said that it will retrieve the current login users profile on the first click. The reason may be like this: After you click the button, the query will be sent
out without taking the AccountName of the specific user. On the second click, we get the specific user from AD, then the query will retrieve the correct result.
I would suggest that you get the AccountName and save it to a hidden field first when you click the button. Then set a rule to check whether this filed contains value,
then perform the query with this value.
By doing this, we can make sure that the query will be executed with the specific AccountName.
Feel free to reply with the test result if the issue still exists.
Best regards