Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 9th, 2004, 04:33 PM
asenguah asenguah is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 asenguah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 22 sec
Reputation Power: 0
Unhappy entering query criteria via a form

Can anyone help please
[a]
I need a way of editing queries that is easy for a novice user (via a form )instead of directly editing the query itself.
Scenario
I have a table of five fields, one holds the age field (number format) with five records
create a simple query with no criteria from the table
Now i want a form which the user can use to query the table to show the field but the user should be able to enter
in any number in the age field to query the table to bring up all the resulting records that have the entered number value
from the age field

Basicaly there would be an enter query form with a button which should then open up the resulting query depending on the
criteria entered. Thus making it easy for the user to easily edit the query
[b]
another similar problem is a form to query a database to check for records that fall between two dates eg. from x to x
I want the user to enter the crietria via a form instead of editing the query which is not flexible for the scenrio i want

Reply With Quote
  #2  
Old December 10th, 2004, 04:43 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Hi asenguah

[a]
Place a text box on your form for the user to enter the age in. Then in your query design in the criteria row below the age field place this syntax:

Forms![FormName]![TextBoxName]

Use your form name and the text box name that you use on your form. This will open the query filtered by what the user typed in the textbox.

[b]
Place two text boxes on your form. Give one the name of StartDate and the other the name of EndDate. Then in your query design view in the criteria under the date field place this syntax:

Between [Forms]![FormName]!BeginningDate] And [Forms]![FormName]![EndingDate]

Just use your form name.

lwells

Reply With Quote
  #3  
Old December 15th, 2004, 08:17 AM
asenguah asenguah is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 asenguah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 22 sec
Reputation Power: 0
Thank you Iwells



Quote:
Originally Posted by lwells
Hi asenguah

[a]
Place a text box on your form for the user to enter the age in. Then in your query design in the criteria row below the age field place this syntax:

Forms![FormName]![TextBoxName]

Use your form name and the text box name that you use on your form. This will open the query filtered by what the user typed in the textbox.

[b]
Place two text boxes on your form. Give one the name of StartDate and the other the name of EndDate. Then in your query design view in the criteria under the date field place this syntax:

Between [Forms]![FormName]!BeginningDate] And [Forms]![FormName]![EndingDate]

Just use your form name.

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > entering query criteria via a form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT