Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query Problems,

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Dear All,

I have 2 tables tblauxdaily and tblagentdata, tblauxdaily is updated daily with yesterdays stats via SS import,(I currently do this by exporting out of lucent to a excel file and then import in, is it possible to import directly out of lucent using VBA) What I need to do is update tblagentdata with all new names that appear in tblauxdaily, the names need to go in tblagentdata as the users windows login (NT - JSmith - InitalSurname)
I was going to use this as an expression to get the users login.
Code:
Left(Left([Agent Name],InStr(1,[Agent Name]," ")),1) & Mid([Agent Name],InStr(1,[Agent Name]," ")+1)
this would give me JSmith from John Smith. This is where I get totally clueless, I then need to update tblagentdata with all new agents, by entering the results of the expression into the tbl, I then also need to enter the agents full name in another field in tblAgentData

tblagentData fields
NT Login
Agent Name

tblAuxData fields
Agent Name

These are the fields I am sure will enable the update but I cannot get it to work. I thought I may need to put the result of 1 query into a temp table and then transfer to the tblAgentData afterwards or can I do it all with 1 query.

Any help/code/suggestions would be greatly appreciated.



Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top