return system information using VBA

MS Office Access

    Next

  • 1. sort per date, today on top
    hi to all, anyone knows a solution to sort a date field (containing day and month only), so that the actual day (or the nearest one to it) is always the first in the list? I want to sort data by season. Lets say ananas is available in the market from 15th of november (any year) and avocado from 15th of march (any year). so when we have the 14th of november, sorting is topped by ananas, when we have 16th of november to 14th of march, sorting is topped by avocado. Thanks for any ideas. ulrich 1947
  • 2. Run Time Error 1004 - Help!!
    Hi - I want to open an Excel file from an Access database and refresh a series of pivots in the xls file - the queries are in a separate database. And that all works fine - 2 out of 10 times!! However, the other eight times I get a message that says "Run Time Error 1004 the database has been placed in a state by user Admin on machine (mine) that makes it impossible to open or lock" (or something like that!!). Nobody else would have the query database open, but even if they did it would be in shared mode with no record locking. Any ideas - I am going nuts!!! Thanks -- Sharon
  • 3. More Excel Passwords!
    Hi - I need to open an XLS file from Access that has two passwords, one to open and one to modify. Does anyone know the code to pass the second password to Access? Any help would be much appreciated! Thanks -- Sharon

return system information using VBA

Postby RG9u » Wed, 09 Aug 2006 09:24:01 GMT

I'm looking for a way to use VBA in Access to return the Full Computer name 
and the User Name.

Re: return system information using VBA

Postby Douglas J. Steele » Wed, 09 Aug 2006 09:56:49 GMT

 http://www.**--****.com/ 
 http://www.**--****.com/ "The Access Web".

-- 
Doug Steele, Microsoft Access MVP
 http://www.**--****.com/ 
(no private e-mails, please)









Similar Threads:

1.Using VBA to export list of mailbox information from System Manager

Hi

I need to analyse the mailbox information in System Manager (Admin Groups - 
{Domain} - Servers - {Server Name} - First Storage Group - Mailbox Store - 
Mailboxes) by exporting the information to Excel.

I use VBA to sort out the exported information as required and I thought 
it'd be a nice touch to automate the whole thing.

Is there any way that VBA could be used to connect to the mailbox store and 
export the information automatically?  If so, are there any links to sites 
which could help explain it?

Thanks
M 


2.Using VB.NET to retreive System Serial Information

I am in the process of developing a Key Generation 
Application for our Products, so that we are able to use 
Hashes of the Computer Components Serial Numbers. Does 
anyone know how to pull IDs/Serials from things like the 
CPU, HDD, Mobo, etc as to use?

Any help is greatly appreciated.

3.How do I code VBA to return information from a web site to an excel workbook

Hi all,
How do I code VBA to return information from a web site to an excel 
workbook.

I tried to record a macro, but it didn't return any code.

Thank you in advance.

Don't have a a specific, but general project in mind.

Richard Mogy 


4.VBA Public function used to return Criterion to Query - return

"Wayne Morgan" wrote:

> Does the combo box return a Null or have you added a record to it to return 
> a value for All Records? Whatever that value is (Null or one you've created) 
> use it in the criteria as follows, no function is needed.
> 
> =[Forms]![FormName]![FormControl] or [Forms]![FormName]![FormControl] Is 
> Null
> 
> If the value of the combo box is Null, then the second half of the 
> expression returns True. If you use True as the criteria, you'll get all 
> records.
> 
> -- 
> Wayne Morgan
> MS Access MVP
> 

Thank you Wayne.
I think where i'm missing your point is the phrase:
"If you use True as the criteria, you'll get all records."
How do i do that please? Should i use another criteria line?

Using the expression: 
[Forms]![FormName]![FormControl] or [Forms]![FormName]![FormControl] Is Null
as the criterion didn't work out, probably because i didn't understand that 
"True as criteria" part.

Anyway, i think i have a wrong approach. 
I should probably write an SQL string that takes into account which Controls 
are active on the Form.

The functionality i'm going for is to have a set of filters (Controls on the 
Form).
The user selects any number of them, and clicks on a CommandButton that runs 
a Query, which runs on a Master Table where all the data resides.

I know how to construct the SQL string, but i'm not sure how to 'connect' it 
to the Query (eg Query 1).
After searching here for a while, i came up with the following expression.
Could you please confirm it's correct?
(Final goal: run Query 1 on a Table using an SQL string to define criteria 
etc.)

    Dim strDocName as String, strSQL as String

    strSQL="SELECT * FROM ... WHERE ..." ' etc.
    CurrentDb.QueryDefs("Query1").SQL = strSQL
    strDocName = "Query1"
    DoCmd.OpenQuery strDocName, acNormal, acEdit


> 
> "alexhatzisavas" < XXXX@XXXXX.COM > wrote in message 
> news: XXXX@XXXXX.COM ...
> > Hi all.
> >
> > I'm calling a Public VBA Function (defined in a VBA module) from the
> > Criterion field of a Query in order to control the criterion of the query.
> >
> > I'm having a problem making the VBA Function return an expression (such 
> > as:
> > Like "*") that will enable the Query to return all the values for the 
> > field
> > where the Criterion exists.
> > That is, i want the VBA function to evaluate to an expression such as " 
> > Like
> > "*" ", that will make the Query return all records.
> >
> > Here are the specifics:
> >
> > Suppose the Query field is "Customer".
> > For field "Customer", i have written the following Criterion:
> > Filter([Forms]![FormName]![FormControl])
> >
> > "Filter" is the Public VBA Function.
> > It accepts [Forms]![FormName]![FormControl] as an argument (this is the
> > value of a control -FormControl- on Form "FormName").
> > The query is activated via a CommandButton on Form "FormName".
> >
> > So, on Form "FormName", the user clicks on the CommandButton that 
> > activates
> > the Query.
> >
> > Depending on whether the user *has* or *has not* selected a value from the
> > control "FormControl" (which is a ComboBox), i want to achieve the 
> > following
> > functionality:
> >
> > Case 1 (this I HAVE accomplished...)
> > - The user *has* selected a value from the ComboBox control (e.g. "ABC"):
> > Thus, [Forms]![FormName]![FormControl]="ABC"
> > In the VBA module, the VBA Function (Filter) becomes: Filter="ABC"
> > In the Query, the Criterion ( Filter([Forms]![FormName]![FormControl] ) 
> > now
> > equals: "ABC"
> > Thus, field "Customer" is properly filtered, and only records with "ABC"
> > appear.
> > This I HAVE accomplished.
> >
> > Case 2 (this I HAVE NOT accomplished...)
> > - The user *has not* selected a value from the control:
> > Thus, [Forms]![FormName]![FormControl]=""
> > In the VBA module, the VBA Function (Filter) SHOULD evaluate to something
> > that enables ALL records of the field with the Criterion to be returned.
> > So, in the VBA code, i'd be lloking for something like:
> > Filter=" Like "*" " (this doesn't work of course)
> >
> > That is, i want to have the VBA function (Filter) return such a value that
> > the criterion becomes Like "*" and all records appear.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> > Alex
> > 
> 
> 
> 

5.VBA Public function used to return Criterion to Query - return "*"

Hi all.

I'm calling a Public VBA Function (defined in a VBA module) from the 
Criterion field of a Query in order to control the criterion of the query.

I'm having a problem making the VBA Function return an expression (such as: 
Like "*") that will enable the Query to return all the values for the field 
where the Criterion exists.
That is, i want the VBA function to evaluate to an expression such as " Like 
"*" ", that will make the Query return all records.

Here are the specifics:

Suppose the Query field is "Customer".
For field "Customer", i have written the following Criterion:
Filter([Forms]![FormName]![FormControl])

"Filter" is the Public VBA Function.
It accepts [Forms]![FormName]![FormControl] as an argument (this is the 
value of a control -FormControl- on Form "FormName").
The query is activated via a CommandButton on Form "FormName".

So, on Form "FormName", the user clicks on the CommandButton that activates 
the Query.

Depending on whether the user *has* or *has not* selected a value from the 
control "FormControl" (which is a ComboBox), i want to achieve the following 
functionality:

Case 1 (this I HAVE accomplished...)
- The user *has* selected a value from the ComboBox control (e.g. "ABC"):
Thus, [Forms]![FormName]![FormControl]="ABC"
In the VBA module, the VBA Function (Filter) becomes: Filter="ABC"
In the Query, the Criterion ( Filter([Forms]![FormName]![FormControl] ) now 
equals: "ABC"
Thus, field "Customer" is properly filtered, and only records with "ABC" 
appear.
This I HAVE accomplished.

Case 2 (this I HAVE NOT accomplished...)
- The user *has not* selected a value from the control:
Thus, [Forms]![FormName]![FormControl]=""
In the VBA module, the VBA Function (Filter) SHOULD evaluate to something 
that enables ALL records of the field with the Criterion to be returned.
So, in the VBA code, i'd be lloking for something like:
Filter=" Like "*" " (this doesn't work of course)

That is, i want to have the VBA function (Filter) return such a value that 
the criterion becomes Like "*" and all records appear.

Any help would be greatly appreciated.

Thanks,
Alex

6. Example of returning rows from a System.Data.SqlClient.SqlCommand object using a stored procedure

7. Returning ??? using System.Text.ASCIIEncoding

8. return sharename using System.IO?



Return to MS Office Access

 

Who is online

Users browsing this forum: No registered users and 46 guest