Solved

popup dialogue box for a query

Posted on 2001-06-18
4
1,239 Views
Last Modified: 2008-02-01
It's an Access 2K database with ODBC links to an MS SQL 2K table.  I've got a Make Table query to thin out the records.  The field is bill_month and it's text.

If I specify the Criteria in the query (either as "04-00" or "Between 04-00 and 12-00"), it works fine.

If I set up the Criteria as a popup dialogue box (as in [Enter Bill Month]), it will work for a specific instance ("04-00") but the between command finds zero records.

What's going on here?  Thanks for the help,

Ken
0
Comment
Question by:KenAdney
  • 3
4 Comments
 
LVL 14

Accepted Solution

by:
mgrattan earned 50 total points
ID: 6203312
Hi Ken,

Are you specifying your between expression like this:

Between [Enter the Start Date] And [Enter the End Date]

If not, you just need to change your expression to include a parameter for both sides of the Between.
0
 
LVL 10

Author Comment

by:KenAdney
ID: 6203340
Yep, that was it.  Apparently I was trying to enter the word "between" as a value.  Thanks so much.
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6203342
If you are entering the expression correctly, as noted in my last comment, and you are experiencing problems then it may have to do with your data type.  Since the values are text there could be a problem with evaluating it correctly using parameters.  In that case, you'll have to get your expression to do some conversions.  For example:

Format([Bill_month],"mm/yy") Between Format([Enter Start Date],"mm/yy") And Format([Enter End Date],"mm/yy")

You can even take it a step further than this by using the CVDate() function to convert the text values to Date/Time format:

Format(CVDate([Bill_month]),"mm/yy") Between Format(CVDate([Enter Start Date]),"mm/yy") And Format(CVDate([Enter End Date]),"mm/yy")
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6203345
Cool, glad you got it to work.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now