PC Review


Reply
Thread Tools Rate Thread

critera search in FP DB

 
 
TNSysman
Guest
Posts: n/a
 
      25th Jun 2008
I'm trying to move a ticket ordering system from paper to an internal
intranet, so I am trying to maintain the 'feel' of the ticket to minimize the
learning curb for the users. I'm not THAT new to FP but I haven't come across
this problem before.

This is the FP generated code from the DRW in criteria.
Why doesn't this work?

fp_sQry="SELECT * FROM Results WHERE (C1 = '::C1::' OR C2 = '::C1::' OR C3
= '::C1::' OR C4 = '::C1::' OR C5 = '::C1::' OR C6 = '::C1::' OR C7 =
'::C1::' OR C9 = '::C1::' OR C9 = '::C1::' OR C10 = '::C1::' OR C11 =
'::C1::' OR C12 = '::C1::' OR C13 = '::C1::' OR C14 = '::C1::' OR C15 =
'::C1::' OR C16 = '::C1::' OR C18 = '::C1::' OR C18 = '::C1::' OR C19 =
'::C1::' OR C20 = '::C1::' OR C21 = '::C1::' OR C22 = '::C1::' OR C23 =
'::C1::' OR C24 = '::C1::' OR C25 = '::C1::' OR C26 = '::C1::' OR C27 =
'::C1::' OR C28 = '::C1::' OR C29 = '::C1::' OR C30 = '::C1::' OR C31 =
'::C1::' AND rundateMO = '::month::') ORDER BY ID DESC"

The C1, C2 etc feilds are dates. The users click a check box for the date
they need there ad to run. It can be multiple dates.
The rundateMO field is for the month.

When I use the form, for example, searching for ads to run on the 6th of
Apr. (c6=6, rundateMO1 = 4) It will return any month with the 6th. Even if I
enter the month as 12, 4, 15, or XXX.

Thanks in advance for any help.
 
Reply With Quote
 
 
 
 
Ronx
Guest
Posts: n/a
 
      25th Jun 2008
Change the where clause:

fp_sQry="SELECT * FROM Results WHERE ((C1 = '::C1::' OR C2 = '::C1::'
OR C3
= '::C1::' OR C4 = '::C1::' OR C5 = '::C1::' OR C6 = '::C1::' OR C7
=
'::C1::' OR C9 = '::C1::' OR C9 = '::C1::' OR C10 = '::C1::' OR C11 =

'::C1::' OR C12 = '::C1::' OR C13 = '::C1::' OR C14 = '::C1::' OR C15
=
'::C1::' OR C16 = '::C1::' OR C18 = '::C1::' OR C18 = '::C1::' OR C19
=
'::C1::' OR C20 = '::C1::' OR C21 = '::C1::' OR C22 = '::C1::' OR C23
=
'::C1::' OR C24 = '::C1::' OR C25 = '::C1::' OR C26 = '::C1::' OR C27
=
'::C1::' OR C28 = '::C1::' OR C29 = '::C1::' OR C30 = '::C1::' OR C31
=
'::C1::') AND rundateMO = '::month::') ORDER BY ID DESC"

Note the extra brackets.
Change this in the grey code in code view, and save the page whilst in
code view. The maroon code will be updated when the page is saved.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




"TNSysman" <(E-Mail Removed)> wrote in message
news:574C5E76-5DB5-457B-82B8-(E-Mail Removed):

> I'm trying to move a ticket ordering system from paper to an internal
> intranet, so I am trying to maintain the 'feel' of the ticket to minimize the
> learning curb for the users. I'm not THAT new to FP but I haven't come across
> this problem before.
>
> This is the FP generated code from the DRW in criteria.
> Why doesn't this work?
>
> fp_sQry="SELECT * FROM Results WHERE (C1 = '::C1::' OR C2 = '::C1::' OR C3
> = '::C1::' OR C4 = '::C1::' OR C5 = '::C1::' OR C6 = '::C1::' OR C7 =
> '::C1::' OR C9 = '::C1::' OR C9 = '::C1::' OR C10 = '::C1::' OR C11 =
> '::C1::' OR C12 = '::C1::' OR C13 = '::C1::' OR C14 = '::C1::' OR C15 =
> '::C1::' OR C16 = '::C1::' OR C18 = '::C1::' OR C18 = '::C1::' OR C19 =
> '::C1::' OR C20 = '::C1::' OR C21 = '::C1::' OR C22 = '::C1::' OR C23 =
> '::C1::' OR C24 = '::C1::' OR C25 = '::C1::' OR C26 = '::C1::' OR C27 =
> '::C1::' OR C28 = '::C1::' OR C29 = '::C1::' OR C30 = '::C1::' OR C31 =
> '::C1::' AND rundateMO = '::month::') ORDER BY ID DESC"
>
> The C1, C2 etc feilds are dates. The users click a check box for the date
> they need there ad to run. It can be multiple dates.
> The rundateMO field is for the month.
>
> When I use the form, for example, searching for ads to run on the 6th of
> Apr. (c6=6, rundateMO1 = 4) It will return any month with the 6th. Even if I
> enter the month as 12, 4, 15, or XXX.
>
> Thanks in advance for any help.


 
Reply With Quote
 
TNSysman
Guest
Posts: n/a
 
      26th Jun 2008
That was it Ronx!
&#$@ brackets

Thanks for being cool!


 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple critera search =?Utf-8?B?TWlyZWU=?= Microsoft Access Queries 3 27th Jul 2007 11:36 AM
Saved Search files don't retain all of search critera RRP Windows XP Help 0 18th Mar 2006 10:35 PM
search data set, then put in all info base on one critera =?Utf-8?B?c2VuaW9yIGJsYW5jbw==?= Microsoft Excel Worksheet Functions 0 20th Jan 2006 03:24 PM
How do I sum with two critera? =?Utf-8?B?Q2xhcmU=?= Microsoft Excel Misc 4 24th Aug 2005 03:05 PM
Re: two critera Don Guillett Microsoft Excel Programming 1 16th Mar 2004 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:37 AM.