473,699 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refer to form's field in query

I'm trying to refer to a form's field in a query like this

strSQL = "SELECT Transactie.* INTO CatTemp"
strSQL = strSQL & " FROM Transactie"
strSQL = strSQL & " WHERE
Transactie.Cate gorie1=[Forms]![05Output]![Inputfield] ;"
dBEngine(0)(0). Execute strSQL, dbFailOnError

but I can't get it to work. I get the message that there are too less
parameters.
What am I doing wrong?
thanks,
john
Sep 24 '06 #1
3 5578
Please ignore.
john

"john" <jo**@test.coms chreef in bericht
news:m7******** *************** *******@casema. nl...
I'm trying to refer to a form's field in a query like this

strSQL = "SELECT Transactie.* INTO CatTemp"
strSQL = strSQL & " FROM Transactie"
strSQL = strSQL & " WHERE
Transactie.Cate gorie1=[Forms]![05Output]![Inputfield] ;"
dBEngine(0)(0). Execute strSQL, dbFailOnError

but I can't get it to work. I get the message that there are too less
parameters.
What am I doing wrong?
thanks,
john


Sep 24 '06 #2
"john" <jo**@test.comw rote in message
<2J************ ********@casema .nl>:
Please ignore.
john

"john" <jo**@test.coms chreef in bericht
news:m7******** *************** *******@casema. nl...
>I'm trying to refer to a form's field in a query like this

strSQL = "SELECT Transactie.* INTO CatTemp"
strSQL = strSQL & " FROM Transactie"
strSQL = strSQL & " WHERE
Transactie.Cat egorie1=[Forms]![05Output]![Inputfield] ;"
dBEngine(0)(0) .Execute strSQL, dbFailOnError

but I can't get it to work. I get the message that there are too
less parameters.
What am I doing wrong?
thanks,
john

For others who might stumble into the same challenge, and decide to
search the NG, it would be nice if you told how you solved it. I'm
guessing one of the possibilities here is

....WHERE Transactie.Cate gorie1=" & Forms!05Output! Inputfield

or

....WHERE Transactie.Cate gorie1='" & Forms!05Output! Inputfield & "'"

--
Roy-Vidar
Sep 24 '06 #3

"RoyVidar" <ro************ *@yahoo.noschre ef in bericht
news:mn******** *************** @yahoo.no...
"john" <jo**@test.comw rote in message
<2J************ ********@casema .nl>:
>Please ignore.
john

"john" <jo**@test.coms chreef in bericht
news:m7******* *************** ********@casema .nl...
>>I'm trying to refer to a form's field in a query like this

strSQL = "SELECT Transactie.* INTO CatTemp"
strSQL = strSQL & " FROM Transactie"
strSQL = strSQL & " WHERE
Transactie.Ca tegorie1=[Forms]![05Output]![Inputfield] ;"
dBEngine(0)(0 ).Execute strSQL, dbFailOnError

but I can't get it to work. I get the message that there are too less
parameters.
What am I doing wrong?
thanks,
john


For others who might stumble into the same challenge, and decide to
search the NG, it would be nice if you told how you solved it. I'm
guessing one of the possibilities here is

...WHERE Transactie.Cate gorie1=" & Forms!05Output! Inputfield

or

...WHERE Transactie.Cate gorie1='" & Forms!05Output! Inputfield & "'"
You're right. The second solution is what I used.
john
Sep 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4983
by: Steve | last post by:
Form FrmRestock's recordsource is QryFrmRestock. The TransactionDate field's criteria is set ats: Forms!FrmRestock!LastXDays. LastXDays on the form is a combobox where the selections are 30, 60 and 90. The default is set at 30. Question1: When the form opens, there are no records displayed although there are many records that fit the criteria of 30. If I put a button on the form to do a requery and press the button, all the records...
1
2578
by: Old Timer | last post by:
I wish to type in a number in my "Code" field, for instance 1060, I then wish the number 1060 to trigger an event that will fill in the next field (township field) For instance, 1060 brings up and fills in name "Spencer Tp". I have 30 townships,2 cities, 6 villages and identifiers consisting 38 separate code numbers assigned by our county government to identify each township,city and village. I ran a "Make Table Query", have created a...
25
10244
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
0
2016
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
1
2912
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access 2000. The access file is in access 2000 format. I have a form that will hold the relevent parameters for the query/report that reports the statistics for all job records that match a certain criteria. These are: - A Customer Name.
3
4139
by: Joshua Ammann | last post by:
Hi, (Using Access 2000) I have two tables, similar to Customers and Orders. (Not an exact parallel, but works for this example.) On a form showing customer data, there is a tab control. One of the tabs has a subform showing order data (in datasheet view). On the same tab there is an unbound textbox (next to the datasheet). I placed a
1
3544
by: meganrobertson22 | last post by:
hi everybody- what is the best way to add data from one form to another? i have 2 tables: person and contract. here are some of the fields. table: person personid (autonumber and primary key) ss#
4
5099
by: Kathy | last post by:
I have a query that is being created in code. When the query is executed I get the error: "The specified field 'Acct' could refer to more than one table listed in the FROM clause". As you can see below, the 'Acct' field is fully qualified in the subselect. What is interesting is if I cut and re-paste the same exact query in the SQL view of design mode for the query object, it works fine. It even works fine if all I do is remove the...
2
946
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about making this work...
0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7755
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6536
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.