473,396 Members | 1,860 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,396 software developers and data experts.

sorting of records

Hello,
Question showed on short example:
I got Table with personal information with field 'Name'
If in Query based on that Table in 'Criteria' field for 'Name' I put
something in '[]' brackets f.e. [Name:] then before run Query I'll be asked
about a Name with which that table will be filtered.
Question: Is there possibility to replace 'putting from keyboard' to pick this
Name from box like Combo Box?

That Query is needed for me to prepare Report to print.

Michal
Aug 1 '06 #1
4 1338
If you want your criteria to be a field on a form, you would put
Forms!YourFormName!YourFieldName in the criteria of the query field.

Hope that helps!
Michal wrote:
Hello,
Question showed on short example:
I got Table with personal information with field 'Name'
If in Query based on that Table in 'Criteria' field for 'Name' I put
something in '[]' brackets f.e. [Name:] then before run Query I'll be asked
about a Name with which that table will be filtered.
Question: Is there possibility to replace 'putting from keyboard' to pick this
Name from box like Combo Box?

That Query is needed for me to prepare Report to print.

Michal
Aug 1 '06 #2
On Tue, 1 Aug 2006 09:47:25 +0000 (UTC), Michal
<mi******@rudy.mif.pg.gda.plwrote:

I think you're talking about filtering, not sorting.
Anyway, yes, that's easy. Create the combobox and fill it. Then change
your [Name:] expression to:
Forms!MyForm!MyCombobox

Btw, it is not recommended to name a field Name, because it is a
reserved word. Rename it to CustomerName, PatientName or whatever
before you run into more problems.

-Tom.

>Hello,
Question showed on short example:
I got Table with personal information with field 'Name'
If in Query based on that Table in 'Criteria' field for 'Name' I put
something in '[]' brackets f.e. [Name:] then before run Query I'll be asked
about a Name with which that table will be filtered.
Question: Is there possibility to replace 'putting from keyboard' to pick this
Name from box like Combo Box?

That Query is needed for me to prepare Report to print.

Michal
Aug 1 '06 #3
Jeff L <jl*******@hotmail.comwrote:
If you want your criteria to be a field on a form, you would put
Forms!YourFormName!YourFieldName in the criteria of the query field.

Hope that helps!
I'm beginner with Access, but hope I'll show my example clearly:
1) I got a Table and Query
2) I want to replace Query filtering from:
a) [EmployeeName:] in Query's Criteria -before Query is run it ask me
for EmployeeName to put from keyboard
to:
b) Combo Box before Query is run -to choose EmployeeName
All I wanna get is list of records in Report (not one recorde per page) for only one
EmployeeName choosen from Combo Box.

Michal
Aug 3 '06 #4
Ok, that is easy enough to do. In your report, you need to have it
based on a query that includes the field that you want to filter
on...in this case EmployeeName. In the criteria of that field, you
would put Forms!YourFormName!ComboBoxName, substituting the names where
appropriate.

Just a suggestion: You might want to filter on a field that makes the
employee unique, like EmployeeID. That way if you have two John Smiths
you can distinguish between them. You can easily set up your combo box
to handle this. Your row source would need to include EmployeeID and
EmployeeName, set the bound column to 1, number of columns to 2, and
column widths to 0;1. Now in the report, your criteria would be for
EmployeeID, and not the name even though the name is what you will be
able to see on the form.

Hope that helps!

Korzeniowski Michal wrote:
Jeff L <jl*******@hotmail.comwrote:
If you want your criteria to be a field on a form, you would put
Forms!YourFormName!YourFieldName in the criteria of the query field.

Hope that helps!

I'm beginner with Access, but hope I'll show my example clearly:
1) I got a Table and Query
2) I want to replace Query filtering from:
a) [EmployeeName:] in Query's Criteria -before Query is run it ask me
for EmployeeName to put from keyboard
to:
b) Combo Box before Query is run -to choose EmployeeName
All I wanna get is list of records in Report (not one recorde per page) for only one
EmployeeName choosen from Combo Box.

Michal
Aug 3 '06 #5

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

Similar topics

5
by: Lad | last post by:
Hi, I have a file of records of 4 fields each. Each field is separated by a semicolon. That is Filed1;Ffield2;Field3;Field4 But there may be also empty records such as ;;;; (only...
0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
1
by: MLH | last post by:
I have a challenge... In a table I call tblStuff4Letters with 3 fields: , and . I have a report called rptOutboundCorrespondence that feeds off this table. Sorting & grouping is turned on in...
4
by: Marie | last post by:
My report has a text field named ItemNum. Most records have a value for ItemNum. I set Grouping And Sorting to sort ascending on the ItemNum field. The records where ItemNum is Null appear at the...
3
by: Neil Hindry | last post by:
I wonder if you can help me. I have setup an address-book database in Access XP. I have the first name & surname as separate fields. As I wanted to sort my database by surname and then by first...
8
by: Matthew Curiale | last post by:
I am creating an app that lists clients of a company for management of different attributes for that company. The first page is a listing of the companies currently in the database. I have my...
5
by: jean.ulrich | last post by:
Hi I have a continous form that contain 10 fields I would like to be able to sort 3 fields with a command button example columnA can be 100 or 200 or 300 (there are many records of the same...
0
by: SvenMathijssen | last post by:
Hi, I've been wrestling with a problem for some time that ought to be fairly simple, but turns out to be very difficult for me to solve. Maybe someone here knows the answer. What I try to do is...
3
KevinADC
by: KevinADC | last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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
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,...

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.