|
-
Apr 18th, 2005, 06:38 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Pass Parameter to Query from Access Form
Hi there,
i have a simple select query in which i need to pass in a value from a textfield on an access form. the query will populate a combobox.
how can i pass in a parameter to the query using the row source option in the designer
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Apr 18th, 2005, 08:50 AM
#2
Frenzied Member
Re: Pass Parameter to Query from Access Form
Not sure what you mean.
You could write your query in code:
"SELECT * FROM Foo WHERE foobar = '" & text1.text & "'"
or if it's an existing query, you could use the Parameters collection of, I think, the QueryDef object. Something like that, anyway, don't use it myself.
Tengo mas preguntas que contestas
-
Apr 18th, 2005, 09:26 AM
#3
Thread Starter
Fanatic Member
Re: Pass Parameter to Query from Access Form
SELECT tbl_Category.Category
FROM tbl_Category
WHERE (((tbl_Category.Location)=Forms!Maintenance!cmboNewLocation));
add the control item you want the value from in the sql view of the query designer
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|