Unfortunately, none of these environment variables gives me the desired output.. several of these point towards the lan ID but none of these point to the associated name..
Not sure how else to describe the problem in more clarity :(
User Profile
Collapse
-
Thanks for your replies guys.. However, using both the methods as advised returns the same result i.e. the windows ID and not the Name associated with that ID.
Let me try to explain the problem again.
In a domain based environment (Office Network), one gets a user ID and their names are associated with the IDs
If I press Ctrl+Alt+Del after logging in, I get a screen that tells me <yaaara> is logged...Leave a comment:
-
Windows ID & Username
Hi Guys !!
Is there any way we can extract the Windows ID & Username associated with it using VBA?
For example, if my Windows ID is "kumar1" and I have a Username "yaaara" associated with it, what is the way to extract both? I am able to extract the ID but not the username..
Any Ideas please?
Thanks ! -
Crosstab Query Issue
Hi Guys,
I'm back with another question this time.. Stuck again :-(
Here's what I'm trying to do..
I have a table with three fields namely Emp_ID (Text), RDate (Date/Time), FShift (Text)
For every employee, I have 14 Records defining their roster for any given week; 2 Records for any given date defining their start & end time.
I need to output the following format in Excel:... -
What needs to be achieved is to create a report in Excel combining the fields in these three queries.. So apparantly, I'd have to write these queries in VBA and then throw the output in Excel?...Leave a comment:
-
Hi Nic,
Apologies for the late response on this.
It surely works great and as required in Access Queries.
However, I'm still a bit confused as to how to carry this out in Access VBA.
Would I be creating a query statement for the first union query and then use its recordset variable in the second crosstab query to get the effect or do you recommend me to create these queries using the regular...Leave a comment:
-
-
Transfer Query Headers to Excel
Hi Guys,
Need another help pls..
I got a query in Access (I have coded it in VBA as well) which returns me some data based on a calculation. The number of columns of the query change according to the criteria.
What I am looking for is a method to transfer the Column Headings alongwith the resultant data into Excel.
I am able to transfer the output data successfully, but not the column headings... -
Thanks for your great inputs Fish... However, just to clarify, rsFirst has been initialized only within the loop. In the previous iterations, rsMain is the recordset which is used.
However, I have fixed the issue by changing my code to the following:
...Code:chk: Set rsMain = New ADODB.Recordset vSQL = "SELECT emp_id,emp_name,tl_id,tl_name,wfm_remarks from tmpHCRECON_PROD2 order by emp_nameLeave a comment:
-
The code is updating a Remark Field based on an Employee Status (As checked in the If... Else... Endif loop in the code..
After the updation is done, the final table is output in an Excel file...
I have tried using the .Open method with the LockOptimistic Lock type and I also need to use the UpdateBatch command as there would be multiple users working on the DB at the same time...
I have re-checked the...Leave a comment:
-
I tried the .Open method as well but still no luck... Apparantly its only the timing which is causing this issue as when a breakpoint is fed in and the code is then executed after stepping in manually, then the output is as desired (maybe coz the tables get enough time to get updated?)
Any way by which we can know whether a table has been updated or not and then execute the next statements?Leave a comment:
-
-
Just to add on, I've tried to Requery the recordset after updating it, but the result is the same...Leave a comment:
-
Table Update taking time?
Hi All,
Pls help me with another issue....
Here's a code that I'm using:
...Code:Set rsMain = New ADODB.Recordset vSQL = "SELECT * from tmpHCRECON_PROD2" Set rsMain = conMain.Execute(vSQL) rsMain.MoveFirst Do While Not rsMain.EOF vRemark = "" If rsMain(16) = "AOD" Then vRemark = "Employee -
The Debug.Print statement gives the same output as in the Message Box... No luck :-(Leave a comment:
-
Lol.. I was wondering the same and found out that the len command gives the correct length as it is supposed to be.. but still when i put it in a messagebox, it gets truncated?Leave a comment:
-
Sorry but not sure how to setup the watch window for this Neo :-(
Pls assist...Leave a comment:
-
-
Hi,
When I add this line, it gives me an error message "Compile error: Sub or function not defined"
The highlight is on "strlen"
Any clues about what I may be doing wrong?Leave a comment:
-
Hi Fish,
The variables I'm using are indeed declared using the "$" symbol..
I have also tried declaring them using the following syntaxes:
Still these variables are not storing the complete query string... Any clues please?Code:Dim vSQL$ Dim vSQL1 as String Dim vSQL2 as Variant
Leave a comment:
No activity results to display
Show More
Leave a comment: