473,657 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting expression into a query

Hi

I am using a form field as criteria in a query like this
[Forms]![MyForm]![MyField]. This works fine if the field has a single value
like "value1" but if the field has an expression as a value like "value1 or
value2" then the query returns nothing. Is there a way to insert the literal
value of the field "value1 or value2" into the query? I want to do it in a
way that I can change this expression at runtime.

Thanks

Regards
Nov 12 '05 #1
1 1514
Answered in the sponsored newsgroups. If you feel _compelled_ to post the
same question to multiple newsgroups, please crosspost so the answers will
show up in the newsgroup with the copies of the question. This one was
_multiposted_ separately, so there is no link from that answer to the
question here.

"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:40******** *************** @news-text.dial.pipex .com...
Hi

I am using a form field as criteria in a query like this
[Forms]![MyForm]![MyField]. This works fine if the field has a single value like "value1" but if the field has an expression as a value like "value1 or value2" then the query returns nothing. Is there a way to insert the literal value of the field "value1 or value2" into the query? I want to do it in a
way that I can change this expression at runtime.

Thanks

Regards

Nov 12 '05 #2

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

Similar topics

39
7873
by: | last post by:
I am trying to run the following agregate function in a parameterized query on Access2000: Min(.*sqr(./.)/) The query saved OK, but an attempt to run it results in the message: The expression is typed incorrectly or it is too complex to be evaluated If the sintax correct? Perhaps it is, otherwise it would not save. What can be done about it?
29
2477
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules" for when and how to use single quotes and double quotes in ASP? thanks! ---------------------- SQL = SQL & "WHERE '" & REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE("GenKTitles.
1
1087
by: bockley | last post by:
I am having trouble inserting two queries...I am trying to insert an new item(pk) into a table in one query, and then inserting an item(fk) in another table that relates to the other item just created in the first. The problem is that in order for the second query to work, the first has to exist in the first table before it will work. Is there a way of running the first query first and then the next. Here is what I have: <cfquery...
2
17075
by: Darren | last post by:
Hi All, This will probably have the easiest solution but as I'm still a newbie and need some help... When building a query I would like to create a field called Name which includes both the first and last name of the person. Here's the expression:
1
314
by: John | last post by:
Hi I am using a form field as criteria in a query like this !!. This works fine if the field has a single value like "value1" but if the field has an expression as a value like "value1 or value2" then the query returns nothing. Is there a way to insert the literal value of the field "value1 or value2" into the query? I want to do it in a way that I can change this expression at runtime. Thanks
2
7355
by: Mike Turco | last post by:
I like using the expression builder for a lot of different things but it isn't always available when I want to use it, for example in the code window, or in all of the control properties. I am usually stuck having to go into the database window, creating a new query, etc., and then right-clicking in a field and selecting build. Is there a shortcut key, a way to add a button to an Access toolbar, or something like that so I can use to...
1
3711
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO CREATE TABLE dbo.aTable ( INT NOT NULL
7
6876
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is expression should return the 4 leftmost characters of the FilmNo
28
16384
by: Marc Gravell | last post by:
In Linq, you can apparently get a meaningful body from and expression's .ToString(); random question - does anybody know if linq also includes a parser? It just seemed it might be a handy way to write a safe but easy implementation (i.e. no codedom) for an IBindingListView.Filter (by compiling to a Predicate<T>). Anybody know if this is possible at all? Marc
3
3527
by: mbardwel | last post by:
I am building a query in Access 2003. Here is my problem. I create an expression called SUN_ST In a later expression I reference a calculation based on SUN_ST ie, MON_ST=sum-SUN_ST SUN_ST is not a value in a table it is a calculation/expression within the query. How do I reference a query expression within an expression.
0
8837
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
8739
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...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7347
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
6175
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
5638
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();...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.