473,804 Members | 3,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

query with criteria on two fileds in one table

Help Needed ms access 2000

I have a table where one field is the year end monthr (January,
February,...... .., December)
and another field is the year end day (1,2,3,........ ,31)

i want to create a query which gets the month and date and returns all
records where Year end month = user input (eg April) and year end day <=
user input (eg 5)

any ideas

i have do not any knowledge of vba and will be using query in design view

thanks
colm o'brien
Nov 12 '05 #1
3 1600
Ok, in your query...
This would be a little nicer for the user if you did a query-by-form
and they could have two text boxes, 1 to pick month, the other to pick
day, but if you want to know more about that -- email me directly for
more info...

BUT, you want to use your existing query, so.........

sounds like you're getting direct user input...

in the criteria field for year's end (to get the month), put this:
[Which Month?] (or what ever you like to see for a prompt message),

and in the criteria field for the day, put this:
<=[Year End Day?]

When the query runs, two input boxes will appear for input: first for
month & then another for day.
[hopefully, the fields in your query are arranged with month before
day, otherwise the prompt for day will appear before month] -- unless
you don't care if that happens...

-Paul

"colmobrien " <co*****@btinte rnet.com> wrote in message news:<c0******* ***@sparta.btin ternet.com>...
Help Needed ms access 2000

I have a table where one field is the year end monthr (January,
February,...... .., December)
and another field is the year end day (1,2,3,........ ,31)

i want to create a query which gets the month and date and returns all
records where Year end month = user input (eg April) and year end day <=
user input (eg 5)

any ideas

i have do not any knowledge of vba and will be using query in design view

thanks
colm o'brien

Nov 12 '05 #2
Paul that is the same as i already had used but in test data i have days as
1, 5 16 but entering 5 on running query still shows all three entries

colm

"PaulT" <pt******@spsu. edu> wrote in message
news:81******** *************** **@posting.goog le.com...
Ok, in your query...
This would be a little nicer for the user if you did a query-by-form
and they could have two text boxes, 1 to pick month, the other to pick
day, but if you want to know more about that -- email me directly for
more info...

BUT, you want to use your existing query, so.........

sounds like you're getting direct user input...

in the criteria field for year's end (to get the month), put this:
[Which Month?] (or what ever you like to see for a prompt message),

and in the criteria field for the day, put this:
<=[Year End Day?]

When the query runs, two input boxes will appear for input: first for
month & then another for day.
[hopefully, the fields in your query are arranged with month before
day, otherwise the prompt for day will appear before month] -- unless
you don't care if that happens...

-Paul

"colmobrien " <co*****@btinte rnet.com> wrote in message

news:<c0******* ***@sparta.btin ternet.com>...
Help Needed ms access 2000

I have a table where one field is the year end monthr (January,
February,...... .., December)
and another field is the year end day (1,2,3,........ ,31)

i want to create a query which gets the month and date and returns all
records where Year end month = user input (eg April) and year end day <= user input (eg 5)

any ideas

i have do not any knowledge of vba and will be using query in design view
thanks
colm o'brien

Nov 12 '05 #3
what if you drop the '<=' to just '=' ?

what is the data type of the field for day? is it text, or number?

are you using any other criteria on the line that I'm unaware of?

these are just some other ideas...

-Paul
(p.s. don't worry, somebody may see something I'm missing, perhaps)
"colmobrien " <cobrien(no Spam)@btinterne t.com> wrote in message news:<c0******* ***@titan.btint ernet.com>...
Paul that is the same as i already had used but in test data i have days as
1, 5 16 but entering 5 on running query still shows all three entries

colm

"PaulT" <pt******@spsu. edu> wrote in message
news:81******** *************** **@posting.goog le.com...
Ok, in your query...
This would be a little nicer for the user if you did a query-by-form
and they could have two text boxes, 1 to pick month, the other to pick
day, but if you want to know more about that -- email me directly for
more info...

BUT, you want to use your existing query, so.........

sounds like you're getting direct user input...

in the criteria field for year's end (to get the month), put this:
[Which Month?] (or what ever you like to see for a prompt message),

and in the criteria field for the day, put this:
<=[Year End Day?]

When the query runs, two input boxes will appear for input: first for
month & then another for day.
[hopefully, the fields in your query are arranged with month before
day, otherwise the prompt for day will appear before month] -- unless
you don't care if that happens...

-Paul

"colmobrien " <co*****@btinte rnet.com> wrote in message

news:<c0******* ***@sparta.btin ternet.com>...
Help Needed ms access 2000

I have a table where one field is the year end monthr (January,
February,...... .., December)
and another field is the year end day (1,2,3,........ ,31)

i want to create a query which gets the month and date and returns all
records where Year end month = user input (eg April) and year end day <= user input (eg 5)

any ideas

i have do not any knowledge of vba and will be using query in design view
thanks
colm o'brien

Nov 12 '05 #4

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

Similar topics

5
4492
by: Bernie | last post by:
Greetings, I have 3 servers all running SQL Server 2000 - 8.00.818. Lets call them parent, child1, and child 2. On parent, I create a view called item as follows: CREATE view Item as select * from child1.dbchild1.dbo.Item union all select * from child2.DBChild2.dbo.Item
3
4991
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...
3
579
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to make a query that selects from a table as desribed below .. I have a table (Volunteer) that has a member field (memnumber) and a number of fields that are headed in various categories and are yes/no formated
1
1805
by: Ivan Carey | last post by:
How can a query display multiple fields with diferent condition on the same field example I have a field name of reason and a field name of duration. I would like to display 2 fileds of total duration but each have different reasion criteria. display Total Recall based on a calculation that adds the total duration for each record that has a criteria of RC on the same query display Total Shift based upon a calculation that adds the
3
3743
by: msrviking | last post by:
Hello everybody, After several attempts of writing the query, I had to post my requirement in the forum. Here is what I have, what I need and what I did. Table A Col1 Col2 1 Nm1
2
2752
by: john | last post by:
This must be simple but I can't figure it out. Table 1 1xM to table 2: Table 1 IDfield 1 2 Table 2 IDfield CriteriaField 1 Criteria value 1 2 Criteria value 1 2 Criteria value 2 For example I need to pull out every IDvalue of table 1 that have both
10
6238
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this cross-tab query I am using a simple query with no grouping where I am filtering some data out in the criteria line. I have been out of access for a couple years but I remember in the past I had a solution for this but I can't remember. Any help...
1
1272
by: kccoolrocks1981 | last post by:
I have two tables naming 1.) Criteria and 2.) IndicatorData. Criteria table has (CriteriaID, CriteriaName,CriteriaValues) Fields. Example( CriteriaName-'Gender 'and values would be 'Male' and 'Female' and CriteriaName-'AgeGroup1' and Values-'<30','30-40','40-50','+50'). IndicatorData table has fields such as (IndicatorDataID, IndicName, Criteria_Code1,Criteria_Value1,Criteria_Code2,Crit eria_Value2,Criteria_Code3,Criteria_Value3,...
3
2504
by: Christoph | last post by:
I have an <S access databse and try to select the the customer ID to print a statemet report based on the customer ID but am unable to do so Can anybody help Thank you Christoph Access 2003
0
9706
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
10577
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...
1
10320
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
9150
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
7620
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
5521
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
4299
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
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
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.