473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Incorporating text boxes are query parameters

I have 2 text boxes that I want to use as the criteria for a column in a query. Right now I am using the expression "> [Forms]![Main]![Text3]" as the criteria for the column. Where "Main" is the form and "Text3" is the name of the textbox. Unfortunanly, when I run the query I get an error saying there is an error in this expression. Can anyone explain where the error is?
Sep 8 '10 #1
5 1248
beacon
579 512MB
Are you putting quotes around the expression or were you just doing that for your post here?
Sep 8 '10 #2
Jerry Maiapu
259 100+
Remove the quotes (" ")surrounding the expression and create a button to run the query from the form. Something like this:

Expand|Select|Wrap|Line Numbers
  1.  DoCmd.OpenQuery "your query name", acViewNormal, acEdit
And see if it works!

****Sometimes when opening (by clicking)query directly does not work**..
Sep 9 '10 #3
NeoPa
32,556 Expert Mod 16PB
Steve, you've omitted your code and the error message that relates to the failure, but asked where you've gone wrong. Does this make sense to you?
Sep 9 '10 #4
Hi Jerry, I am not trying to use the openquery function to run the query. Rather I am trying to find the command that goes into the "Criteria" line of a query that will compel the query to use the inputs on a form's textboxes to set the parameters for the query
Sep 9 '10 #5
beacon
579 512MB
I see a couple of things that you need to check and/or provide more information about before we can effectively (and efficiently) help you out. Otherwise, we're all just making guesses, everyone will end up frustrated, and your question will go unanswered.

So, that being said, please provide more information for each of the following items:

1.Do you literally have quotes around the expression you have in the "Criteria" section of your query?

If you are getting an error message and the criteria you have entered is literally ">[Forms]![Main]![Text3]" with the quotes, then you need to remove the quotes.

If you are getting an error message and you don't have quotes around your expression, then your expression is likely incorrect. Double-check the name of your form and the name of the textbox to ensure that the query is receiving data from the correct place.

2. What is the error message you are receiving?

NeoPa already asked you for this information, but I'm asking again. I think everyone that has replied understands what you are trying to do, but the lack of information is making it difficult to give you the answer you seek.

3. If your question, from your original post, is "Can anyone explain where the error is?", then the answer is yes we can and no we can't. The error is most likely in your criteria expression, but there's no way for us to know because you haven't provided the error message. How can any of answer where the error is when we don't know what the error message says?

I apologize if this comes across as rude, but you have to understand that we cannot read your mind and we don't have the luxury of looking at your database over your shoulder, so please, in the future, provide more details so we can assist you to the best of our abilities.
Sep 9 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gertjan van Heijst | last post by:
Hi, I really hope someone can help me because I've already spend 2 days on this problem and I'm not getting anywhere. I think the problem is that I don't really understand how text boxes store...
0
by: Jim | last post by:
Hi, there, I am a beginner on Access. I have been taking so long time to try to figure out his, but so far, no clues. I want to select 2 combo boxes and Access will automatically fill in...
1
by: Serious_Practitioner | last post by:
Hello, all - I want to get a customer name, address and so forth from a customer table using either a SELECT statement in a VBA procedure or in a query. The user should be able to put a customer...
1
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...
4
by: godber | last post by:
I need to populate text boxes for instance with employee information using their unique employee works number selected from a combo box. Can anyone help, I am told thru visual basic this can be...
0
by: Hi5 | last post by:
Hi, I am working for a client with loads of expectations from a simple database. Now, they want me to make them an access form, in which it will enable them to query the database using theee...
9
by: David Horowitz | last post by:
Hi. I have a query named Query1. Let's say it looks like this: Select * from Table1 where Field1= So whenever you run the query, it prompts for "Enter Value". So now, I have Report1, whose...
4
by: enrique | last post by:
Hi, I apologize for a newbie question, but my books/research have yielded me no examples and my time is now short. I simply want to update data from text boxes (fields). I'm not using a datagrid...
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
15
by: martin DH | last post by:
Good morning, I have added several posts out here on a project on which I am working - thank you very much to everyone who has responded with ideas and solutions! My new question: I am drawing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.