Access 2007 Dispaly data from a query in a text box

avtuvy

Registered User.
Local time
Today, 08:27
Joined
Jan 10, 2010
Messages
39
I am new to access so please bear with me. I am using an Access form to display data stored in an SQL2005 database. I was able to successfully connect to the database using ODBC and my form has a combo box and a text box. I wrote a query in Access which runs successfully against one of the tables in the SQL tables and I am getting the correct results. There are two things which I am having problems with

1. How do I display the result of the query in the text box(The query always returns a single value)
2. How to use the text from the combo box as an input for the WHERE clause in the query?

This is my query

Code:
SELECT dbo_TBL_ServerInformation.SerialNumber
FROM dbo_TBL_ServerInformation
WHERE dbo_TBL_ServerInformation.serverName='Fuga';
 
I am new to access so please bear with me. I am using an Access form to display data stored in an SQL2005 database. I was able to successfully connect to the database using ODBC and my form has a combo box and a text box. I wrote a query in Access which runs successfully against one of the tables in the SQL tables and I am getting the correct results. There are two things which I am having problems with

1. How do I display the result of the query in the text box(The query always returns a single value)
2. How to use the text from the combo box as an input for the WHERE clause in the query?

This is my query

Code:
SELECT dbo_TBL_ServerInformation.SerialNumber
FROM dbo_TBL_ServerInformation
WHERE dbo_TBL_ServerInformation.serverName='Fuga';

You should investigate forms. Text boxes.
Here's a link with many Access tutorials and examples.
http://www.fontstuff.com/siteindex.htm#access
 
Thank you for the your help
 

Users who are viewing this thread

Back
Top Bottom