Re: Easy ?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Did you implement the WHERE clause that I put in the last post, as it is
different from your last one?

"Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
news:2436A25B-A294-4AFF-AB1A-17A7B6336CE6@xxxxxxxxxxxxxxxx
> Yes, this is what I strive... I tried implementing this and considering
> "Test*" as My unbound fields on form "SearchPractician" but it just
> doesn't
> work to make two fields searchable...
> My goal is a similar thing as the FilterOnForm but returning a continuous
> form instead of a unique record...
> Any other suggestions to get something like this because this appears to
> be
> endless struggling...
> I am a tough student huh, master ?
>
>
>
> --
> Novice
>
>
> "[MVP] S.Clark" wrote:
>
>> Suppose that ContactName and ContactTitle are LastName and FirstName. Is
>> this for what you strive?
>>
>> WHERE
>> (((Customers.ContactName) Like "Test*")
>> AND
>> (Not (Customers.ContactName) Is Null))
>> OR
>> (((Customers.ContactTitle) Like "Test*")
>> AND
>> (Not (Customers.ContactTitle) Is Null));
>>
>> "Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
>> news:D0AD29D8-DFB3-4375-9A5F-2BAC7045B23B@xxxxxxxxxxxxxxxx
>> > Well, hope you had a nice weekend.
>> > Thanks again but it still didn't operated the way it should... here is
>> > how
>> > I
>> > replaced in you suggestion...
>> >
>> > WHERE (([Läkare List].[Last name]) Like Forms!SearchPractician!LN &
>> > "*")
>> > Or
>> > (NOT IsNull([Läkare List].[Last Name])) AND (([Läkare List].[First
>> > name])
>> > Like Forms!SearchPractician!FN & "*") Or (NOT IsNull([Läkare
>> > List].[First
>> > Name]));
>> >
>> > Still only works for the Last name, not for the first name and there
>> > are
>> > more criteria to add
>> > Thanks
>> >
>> > --
>> > Novice
>> >
>> >
>> > "[MVP] S.Clark" wrote:
>> >
>> >> No waste, no apology needed. Remember, one other person might read
>> >> this
>> >> and
>> >> find value.
>> >>
>> >> It comes down to basic Order of Operations(Arithmetic)
>> >>
>> >> These two are the same:
>> >> Where A OR B AND C
>> >> Where A OR (B AND C)
>> >>
>> >> But this one is different
>> >> Where (A OR B) AND C
>> >>
>> >> Your need is like the last one. Just exchange the letters for your
>> >> criteria.
>> >>
>> >> "Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
>> >> news:F1C5A541-2C2C-4246-8B12-08746BCC8929@xxxxxxxxxxxxxxxx
>> >> > Thanks,
>> >> > I guess I didn't make myself clear before. sorry that I am wasting
>> >> > your
>> >> > time
>> >> > on this but how do I add extra conditions so that I can put a B for
>> >> > first
>> >> > name to show all doctors who have first name starting with b AND/OR
>> >> > Last
>> >> > name
>> >> > starting with J as inputted in other field. And/Or phonenumber
>> >> > starting
>> >> > on
>> >> > 016... and so on...
>> >> >
>> >> > I have 7 fields on my [SelectPractician] form (all correspond to a
>> >> > field
>> >> > in
>> >> > my query/table for filter/search)
>> >> >
>> >> > this means seven separate WHERE conditions... how to bring them
>> >> > together ?
>> >> >
>> >> > Thanks again,m
>> >> >
>> >> > Ben
>> >> >
>> >> > --
>> >> > Novice
>> >> >
>> >> >
>> >> > "[MVP] S.Clark" wrote:
>> >> >
>> >> >> WHERE ((([Läkare List].[Last name]) Like
>> >> >> [Forms]![SearchPractician]![LN]
>> >> >> &
>> >> >> "*")) OR (NOT IsNull([Läkare List].[Last name]))
>> >> >>
>> >> >> "Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
>> >> >> news:F4ADB71A-961B-474A-BB2D-B6870504E051@xxxxxxxxxxxxxxxx
>> >> >> > Steve,
>> >> >> > Thanks for pointing out to me about the country thing, I removed
>> >> >> > that
>> >> >> > one
>> >> >> > as
>> >> >> > I have a sort on that in the continuous form anyway...
>> >> >> >
>> >> >> > But hmmm, I made it work on a single one... but now, Can I
>> >> >> > combine ?
>> >> >> > How ?
>> >> >> > This one works...
>> >> >> > WHERE ((([Läkare List].[First name]) Like
>> >> >> > [Forms]![SearchPractician]![FN]
>> >> >> > &
>> >> >> > "*")) OR (((IsNull([Läkare List].[Fast name]))<>False))
>> >> >> >
>> >> >> > But how to add this one so that you can search on both ?
>> >> >> > WHERE ((([Läkare List].[Last name]) Like
>> >> >> > [Forms]![SearchPractician]![LN] &
>> >> >> > "*")) OR (((IsNull([Läkare List].[Last name]))<>False))
>> >> >> >
>> >> >> > Or one of them but give all possibilities...
>> >> >> > I can't seem to get them to work together... tried a couple of
>> >> >> > things,
>> >> >> > but
>> >> >> > I
>> >> >> > am not an expert at all (guess that was obvious already).
>> >> >> >
>> >> >> > Thanks again,
>> >> >> > Ben
>> >> >> > --
>> >> >> > Novice
>> >> >> >
>> >> >> >
>> >> >> > "[MVP] S.Clark" wrote:
>> >> >> >
>> >> >> >> Do you understand that this part of your query string doesn't do
>> >> >> >> anything:
>> >> >> >>
>> >> >> >> Forms!SearchPractician!Country Is Null
>> >> >> >>
>> >> >> >> That is not a field in your table, so there's nothing the Query
>> >> >> >> can
>> >> >> >> do
>> >> >> >> with
>> >> >> >> it.
>> >> >> >>
>> >> >> >> You need to translate whatever that UI input is to something
>> >> >> >> relevant
>> >> >> >> in
>> >> >> >> the
>> >> >> >> table.
>> >> >> >>
>> >> >> >> "Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
>> >> >> >> news:34DE6FF7-8E35-40AC-BEEB-17BEC66D3A9B@xxxxxxxxxxxxxxxx
>> >> >> >> > Thanks both... but it doesn't do it
>> >> >> >> >
>> >> >> >> > Here's what I tried to make out of it with your help... the
>> >> >> >> > focus
>> >> >> >> > lies
>> >> >> >> > on
>> >> >> >> > this as you suggested :
>> >> >> >> >
>> >> >> >> > WHERE ((([Läkare List].[Country ID]) LIKE
>> >> >> >> > Forms!SearchPractician!Country &
>> >> >> >> > "*" Or Forms!SearchPractician!Country Is Null)
>> >> >> >> >
>> >> >> >> > And here is my complete query:
>> >> >> >> >
>> >> >> >> > SELECT [Läkare List].ID, [Läkare List].[Country ID], [Läkare
>> >> >> >> > List].Region,
>> >> >> >> > [Läkare List].[First name], [Läkare List].[Last name], [Läkare
>> >> >> >> > List].[Name
>> >> >> >> > Practice/Hospital], [Läkare List].[Male/Female], [Läkare
>> >> >> >> > List].[Language
>> >> >> >> > ID],
>> >> >> >> > [Läkare List].Phonenumber, [Läkare List].Faxnumber, [Läkare
>> >> >> >> > List].[E-mail
>> >> >> >> > address], [Läkare List].Street, [Läkare List].[Postal Code +
>> >> >> >> > City]
>> >> >> >> > FROM [Läkare List]
>> >> >> >> > WHERE ((([Läkare List].[Country ID]) LIKE
>> >> >> >> > Forms!SearchPractician!Country &
>> >> >> >> > "*" Or Forms!SearchPractician!Country Is Null) And (([Läkare
>> >> >> >> > List].Region)
>> >> >> >> > LIKE Forms!SearchPractician!Region & "*" Or
>> >> >> >> > Forms!SearchPractician!Region
>> >> >> >> > Is
>> >> >> >> > Null) And (([Läkare List].[First name]) LIKE
>> >> >> >> > Forms!SearchPractician!FN
>> >> >> >> > &
>> >> >> >> > "*"
>> >> >> >> > Or Forms!SearchPractician!FN Is Null) And (([Läkare
>> >> >> >> > List].[Last
>> >> >> >> > name])
>> >> >> >> > LIKE
>> >> >> >> > Forms!SearchPractician!LN & "*" Or Forms!SearchPractician!LN
>> >> >> >> > Is
>> >> >> >> > Null)
>> >> >> >> > And
>> >> >> >> > (([Läkare List].[Name Practice/Hospital]) LIKE
>> >> >> >> > Forms!SearchPractician!NPH
>> >> >> >> > &
>> >> >> >> > "*" Or Forms!SearchPractician!NPH Is Null) And (([Läkare
>> >> >> >> > List].[Language
>> >> >> >> > ID])
>> >> >> >> > LIKE Forms!SearchPractician!Lang & "*" Or
>> >> >> >> > Forms!SearchPractician!Lang
>> >> >> >> > Is
>> >> >> >> > Null) And (([Läkare List].Phonenumber) LIKE
>> >> >> >> > Forms!SearchPractician!Tel
>> >> >> >> > &
>> >> >> >> > "*"
>> >> >> >> > Or Forms!SearchPractician!Tel Is Null) And (([Läkare
>> >> >> >> > List].Faxnumber)
>> >> >> >> > LIKE
>> >> >> >> > Forms!SearchPractician!Fax & "*" Or Forms!SearchPractician!Fax
>> >> >> >> > Is
>> >> >> >> > Null)
>> >> >> >> > And
>> >> >> >> > (([Läkare List].[E-mail address]) LIKE
>> >> >> >> > Forms!SearchPractician!Epost
>> >> >> >> > &
>> >> >> >> > "*"
>> >> >> >> > Or
>> >> >> >> > Forms!SearchPractician!Epost Is Null) And (([Läkare
>> >> >> >> > List].Street)
>> >> >> >> > LIKE
>> >> >> >> > Forms!SearchPractician!Str & "*" Or Forms!SearchPractician!Str
>> >> >> >> > Is
>> >> >> >> > Null)
>> >> >> >> > And
>> >> >> >> > (([Läkare List].[Postal Code + City]) LIKE
>> >> >> >> > Forms!SearchPractician!PCCity &
>> >> >> >> > "*" Or Forms!SearchPractician!PCCity Is Null));
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Oh, BTW I can't open my query in design. Error message: not
>> >> >> >> > enough
>> >> >> >> > memory...
>> >> >> >> > is this too tough for access or am I doing something wrong ?
>> >> >> >> >
>> >> >> >> > Thanks again,
>> >> >> >> > Ben
>> >> >> >> > --
>> >> >> >> > Novice
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "[MVP] S.Clark" wrote:
>> >> >> >> >
>> >> >> >> >> Use the LIKE Operator:
>> >> >> >> >>
>> >> >> >> >> WHERE Fieldname LIKE
>> >> >> >> >> Forms![SelectRunningProjectForOverview]![Kommandoknapp3] &
>> >> >> >> >> "*"
>> >> >> >> >> Or
>> >> >> >> >> IsNull(Fieldname)
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Steve Clark, Access MVP
>> >> >> >> >> http://www.fmsinc.com/consulting
>> >> >> >> >> *FREE* Access Tips: http://www.fmsinc.com/free/tips.html
>> >> >> >> >>
>> >> >> >> >> "Ben" <Kinobi@xxxxxxxxxxxxxx> wrote in message
>> >> >> >> >> news:8CA91347-5B0A-46CF-8346-EF3D9B8027FF@xxxxxxxxxxxxxxxx
>> >> >> >> >> >I am using unbound form fields to create a filter in a query
>> >> >> >> >> >to
>> >> >> >> >> >view
>> >> >> >> >> >it
>> >> >> >> >> >on
>> >> >> >> >> >a
>> >> >> >> >> > continuous form.
>> >> >> >> >> > Works great with :
>> >> >> >> >> >
>> >> >> >> >> > Forms![SelectRunningProjectForOverview]![Kommandoknapp3]
>> >> >> >> >> > Or
>> >> >> >> >> > Forms![SelectRunningProjectForOverview]![Kommandoknapp3]
>> >> >> >> >> > Is
>> >> >> >> >> > Null
>> >> >> >> >> >
>> >> >> >> >> > But now I would like to have this to work when the users
>> >> >> >> >> > input
>> >> >> >> >> > only
>> >> >> >> >> > a
>> >> >> >> >> > couple
>> >> >> >> >> > of letters... instead of the full word/name.
>> >> >> >> >> >
>> >> >> >> >> > Thanks,
>> >> >> >> >> > Ben
>> >> >> >> >> >
>> >> >> >> >> > --
>> >> >> >> >> > Novice
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


.



Relevant Pages

  • Re: Easy ?
    ... My goal is a similar thing as the FilterOnForm but returning a continuous ... Novice ... > Suppose that ContactName and ContactTitle are LastName and FirstName. ... >>> criteria. ...
    (microsoft.public.access.queries)
  • Re: Easy ?
    ... Suppose that ContactName and ContactTitle are LastName and FirstName. ... >> criteria. ... >>> on this but how do I add extra conditions so that I can put a B for ... >>> Novice ...
    (microsoft.public.access.queries)