473,651 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parameter query!!!

1 New Member
Hi!

Could somebody help me to create simply parameter query?

I need query like this:

select [column_name] from table_name;

column_name should be parameter from combo box or user can type column name.

Thanks...
Oct 24 '06 #1
1 1384
PEB
1,418 Recognized Expert Top Contributor
Hi,

If the user type the colum it's not just like a parameter query!

In your combobox you can create a list with thwe fields in your table, your query will be parameter query

But not only parameter one! ;)

Imagine that this column has multiple rows not just one...

Maybe you want to visualize all records of the respective column?

So sure that you need a user defined function written on VB like:

Function return_field_Va lue(Fiel, ID_row, Table)

Can you define at your own?

A simillar code I've posted in the forum... If you don't find it I'll type it again..

And than you need to use the ready function in your query

Than your parameter in the query will be
return_field_Va lue(Forms![AskingForm]![WantedField], [ID], "MyTable")
Where you have a Form Named AskingForm with Field named WantedField, and table named MyTable with primary key ID


:)
Oct 27 '06 #2

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

Similar topics

5
4280
by: MX1 | last post by:
Simpler way to ask question from my previous post. I wrote a query and it has a paramter field in it. I want to enter a date with the current year. If it I put in 6/30/2003, it works great. If I put in some kind of a variable based input for the parameter like '6/30/' & year(now()), it doesn't work. Is there any way to concatenate text and a variable at the input of a parameter query. THIS IS DRIVING ME NUTS. PLEASE HELP. :)
1
3800
by: Cory | last post by:
When I run the subroutine testEmailContacts the msgbox says that there is only 1 record. The sql for qyEmailContactsQyCard is below. There is over 3000 records in the table "tbl:Contact". What am i doing wrong? Thanks in advance. PARAMETERS cardYesNo Bit, ParSearchCard Bit; SELECT .ContactID FROM WHERE (((.Card)=)) OR ((()=No));
2
6510
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result. I then want to search through the records and select those with dates (as caluclated above) within a user defined range, and so I am using a parameter query. However, this query returns dates outside of the range and appears to have particular...
1
2575
by: carrionk | last post by:
Hi, I have created a Subform which SourceObject is a parameter query. This is the Query: Qry Name:80IsscomProduct SELECT * FROM Isscomp28 WHERE Like ;
1
1805
by: john_stivenson | last post by:
I have a subform whose source is a parameter query. How can I programatically change query parameters and refresh subform without showing "Enter Parameter Value" dialog?
0
1387
by: AP | last post by:
I use the following snippet to open a build a querydef. This works great with a query that has a parameter that points to a form, but if I try to use it in a parameter query, even if the parameter is defined I get the following error 2482 Access cant find the name 'enter year' you entered in your expression. 'This is the code snippet I use to open see below for an example of
1
1637
by: jmarr02s | last post by:
When I double click on my form..I get a Parameter Query box. How can I turn this off?! I went to properties, but did not see anything that would help remove this. I also deleted the query from which this Parameter Query box originates.
3
1612
by: limperger | last post by:
Hello everyone: This question is neither urgent nor important, but I post it just in case anyone knows (and wants to give a reply, of course XD). I have little idea of VBA, but I have dared to write a little piece of code. It is as follows: Private Sub Comando551_Click() Dim qry As String qry = "BUSQUEDA PACIENTES" DoCmd.OpenQuery qry If . Is Not Null Then MsgBox ("This person is present in the DB")
4
2677
by: chicane | last post by:
I am currently writing a query in Access. I need to set up a parameter query for three fields which are called Status (text field), Authorised (date field) and Legal notices (date field). I need to set it up so that the user can enter info into each of the fields and run the query from that but I also need to set it up so that if nothing is entered into the parameter boxes that it needs to return all results. I have set up the first...
2
3516
by: brat33 | last post by:
I am trying to modify some code to create a mail merged label document within Word 2007, using a Access 2007 Parameter Field. My issue comes about when I cannot see the Parameter Query within the selecting list in Word. I would rather not have 40 queries for each year we are pulling, so I want to use the parameter query to simplify things. I have thought using a Temp. Table and pulling from there - but have no clue as to how to go about...
0
8352
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
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8697
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
8465
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
5612
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
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
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
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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.