Ivan Howard
Registered User.
- Local time
- Today, 18:36
- Joined
- May 12, 2009
- Messages
- 11
Hi All,
Please could someone kindly help me with this issue. I'm sure it is something simple, but I don't know what I'm doing wrong.
All I want to do is update a table with the Windows Username of the person importing a spreadsheet.
I have imported the spreadsheet successfuly into a temporary table and now want to update it. The code just doesnt work.
Any help is greatly appreciated.
Thanks.
Ivan
Please could someone kindly help me with this issue. I'm sure it is something simple, but I don't know what I'm doing wrong.
All I want to do is update a table with the Windows Username of the person importing a spreadsheet.
I have imported the spreadsheet successfuly into a temporary table and now want to update it. The code just doesnt work.
Code:
Public Function UpdateDateAndBy()
Dim SQL As String
Dim WINUSERNAME As String
WINUSERNAME = Environ("UserName")
SQL = "UPDATE tblMainData SET ImportedBy=" & WINUSERNAME
DoCmd.RunSQL SQL
End Function
Any help is greatly appreciated.
Thanks.
Ivan