B blue2kuk New member Local time Yesterday, 20:13 Joined Jan 11, 2005 Messages 7 May 15, 2006 #1 Hi All I want a user to click a button and then it will assign the oldest record in the table to that particular user, by using their NT login. Anyone got any suggestions? Thanks
Hi All I want a user to click a button and then it will assign the oldest record in the table to that particular user, by using their NT login. Anyone got any suggestions? Thanks
P Pat Hartman Super Moderator Staff member Local time Yesterday, 23:13 Joined Feb 19, 2002 Messages 47,966 May 15, 2006 #2 query1: Select Top 1 RecKey, TranDate, NTLogon From YourTable Where NTLogon Is Null Order by TranDate descending; query2: Update query1 Set NTLogon = Forms!YourFormName!NTLogon; Run query2 in the button click event.
query1: Select Top 1 RecKey, TranDate, NTLogon From YourTable Where NTLogon Is Null Order by TranDate descending; query2: Update query1 Set NTLogon = Forms!YourFormName!NTLogon; Run query2 in the button click event.
B blue2kuk New member Local time Yesterday, 20:13 Joined Jan 11, 2005 Messages 7 May 16, 2006 #3 Pat Hartman said: query1: Select Top 1 RecKey, TranDate, NTLogon From YourTable Where NTLogon Is Null Order by TranDate descending; query2: Update query1 Set NTLogon = Forms!YourFormName!NTLogon; Run query2 in the button click event. Click to expand... Pat, Thank you for your response. I am ok with most of the code, however, having problems with "Select Top 1 RecKey, Trandate, NTLogin. What does this mean as the system will not reconise RecKey Thanks
Pat Hartman said: query1: Select Top 1 RecKey, TranDate, NTLogon From YourTable Where NTLogon Is Null Order by TranDate descending; query2: Update query1 Set NTLogon = Forms!YourFormName!NTLogon; Run query2 in the button click event. Click to expand... Pat, Thank you for your response. I am ok with most of the code, however, having problems with "Select Top 1 RecKey, Trandate, NTLogin. What does this mean as the system will not reconise RecKey Thanks
B blue2kuk New member Local time Yesterday, 20:13 Joined Jan 11, 2005 Messages 7 May 16, 2006 #4 Pat, I have worked it out, it works wonders when you look at it in simple terms. Many Thanks for your help. Regards Blue2kuk
Pat, I have worked it out, it works wonders when you look at it in simple terms. Many Thanks for your help. Regards Blue2kuk
B blue2kuk New member Local time Yesterday, 20:13 Joined Jan 11, 2005 Messages 7 May 17, 2006 #5 Hi I would also like the query to also assign any records with the same account number which are outstanding to the same user. Is there a way that this could be done?
Hi I would also like the query to also assign any records with the same account number which are outstanding to the same user. Is there a way that this could be done?
P Pat Hartman Super Moderator Staff member Local time Yesterday, 23:13 Joined Feb 19, 2002 Messages 47,966 May 18, 2006 #6 You will need to do that in a separate query.