fetching multiple fields from database

A

abadd0n

Hi,

I have a database with IP address and hostname of a server. Now the problem
here is some of the servers are running in cluster and have duplicate
hostname. I am looking for a command/suggestion that incase if i type a
hostname. It automatically shows all the corresponding IP Address of the
given hostname.

Please help. Attached below is the sample database.

IP Address Hostname
10.1.1.2 Juni
10.1.6.8 Ora
10.1.5.6 Tetli
10.1.1.6 Juni

Thanks,
abadd0n
 
C

Clifford Bass

Hi,

How about a select query that uses a parameter? Create a new query,
choose your table, drag the IP Address field down and the Hostname field name
down. Enter "[Please enter host name:]" (without the quotes) as the criteria
for Hostname. If you change to SQL View it will look something like this:

select [tblServers].[Hostname], [IP Address]
from [tblServers]
where [tblServers].[Hostname] = [Please enter host name:]

When you run it it will ask for the host name and will display the host
name and IP numbers for that host.

Clifford Bass
 
A

abadd0n

Thanks for your response Clifford. Actually I am new to Access, don't know
much about it. I am planning to create a form in VB where I will be manually
entering the hostname and I want that it should fetch the value I have
entered in the text box. The table I have mentioned is just an example, I
need to fetch lot of information like criticality, OS, Application running
etc.

Please let me know if it is possible. As I don't know much about this would
request you to please be as elaborative and possible

Clifford Bass said:
Hi,

How about a select query that uses a parameter? Create a new query,
choose your table, drag the IP Address field down and the Hostname field name
down. Enter "[Please enter host name:]" (without the quotes) as the criteria
for Hostname. If you change to SQL View it will look something like this:

select [tblServers].[Hostname], [IP Address]
from [tblServers]
where [tblServers].[Hostname] = [Please enter host name:]

When you run it it will ask for the host name and will display the host
name and IP numbers for that host.

Clifford Bass

abadd0n said:
Hi,

I have a database with IP address and hostname of a server. Now the problem
here is some of the servers are running in cluster and have duplicate
hostname. I am looking for a command/suggestion that incase if i type a
hostname. It automatically shows all the corresponding IP Address of the
given hostname.

Please help. Attached below is the sample database.

IP Address Hostname
10.1.1.2 Juni
10.1.6.8 Ora
10.1.5.6 Tetli
10.1.1.6 Juni

Thanks,
abadd0n
 
C

Clifford Bass

Hi,

It is all quite possible. It may be easier to create forms based on
the tables. Try out the form wizard. When the forms are opened they
automatically load all of the records. Then you can click on the field to
search and click on the binoculars icon in the tool bar to do a search.

There is too much to tell for me to be detailed. Since you are new, I
would suggest you check out a number of web sites on Access such as
http://office.microsoft.com/en-us/training/CR101582831033.aspx,
http://www.mvps.org/access/, http://www.accessmonster.com/ and
http://www.functionx.com/access/index.htm to learn more. You can also do a
search for "microsoft access tutorial" to find others. Or, there are lots of
books on learning Access. And of course, the online help contains a lot of
useful information.

When you get to some hard spots, you can post specific questions.

Good Luck,

Clifford Bass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top