F
Fred Bloggs
I've posted this in the 'queries' newsgroup, but didn't know whether it
should actually be here, so apologies in advance for cross-posting. I'm
pulling what's left of my hair out...can any of you experts help a relative
newbie with a problem that's driving me nuts?
I've created a query by form using the Microsoft article Q304428, just as it
says, in order to locate therapists in the UK. I want to be able to search
on Surname or County or Town or Post Code and bring back the relevant
records that match.
I've created a form with four textboxes on it: BySname, ByCounty, ByTown,
ByPCode and a command button.
I've called the form Therapistlocator
I've created a macro called QBFQuery1 which is run from the command button
on the form.
I've created a query called 'test' (okay, but after several hundred corrupt
queries, it's all I could think of).
In the query, I've got four table fields: Surname, County, Town and
PostCode.
I've put the following criteria in each one:
In Surname:
[Forms]![Therapistlocator]![BySname] Or [Forms]![Therapistlocator]![BySname]
Is Null
In County:
[Forms]![Therapistlocator]![ByCounty] Or
[Forms]![Therapistlocator]![ByCounty] Is Null
In Town:
[Forms]![Therapistlocator]![ByTown] Or [Forms]![Therapistlocator]![ByTown]
Is Null
In the PostCode field in the table, the postcodes are xxx xxx, so because I
want search only on the first two letters, I created another field like so:
Expr1: Left([PostCode],2)
In the criteria for this, I've put:
[Forms]![Therapistlocator]![ByPCode] Or [Forms]![Therapistlocator]![ByPCode]
Is Null
Nothing complicated, eh? But, when I run the form, I get zero records. When
I then go back to the query, Access has added about a dozen lines of extra
bits of the expressions all over the place, has truncated most of the
expressions, and has created about three new columns, all headed up with
bits of code!
If I only put criteria in one field, it seems to work but the minute I add
criteria to another field, it does it all over again. Is this a bug? Did MS
get it wrong in their article? I've tried it on another machine and still
get the same problem. Help!!!!
I'm using Microsoft Access 2002 SP-2
I know there's someone out there who can help...I'd be very grateful.
James.
should actually be here, so apologies in advance for cross-posting. I'm
pulling what's left of my hair out...can any of you experts help a relative
newbie with a problem that's driving me nuts?
I've created a query by form using the Microsoft article Q304428, just as it
says, in order to locate therapists in the UK. I want to be able to search
on Surname or County or Town or Post Code and bring back the relevant
records that match.
I've created a form with four textboxes on it: BySname, ByCounty, ByTown,
ByPCode and a command button.
I've called the form Therapistlocator
I've created a macro called QBFQuery1 which is run from the command button
on the form.
I've created a query called 'test' (okay, but after several hundred corrupt
queries, it's all I could think of).
In the query, I've got four table fields: Surname, County, Town and
PostCode.
I've put the following criteria in each one:
In Surname:
[Forms]![Therapistlocator]![BySname] Or [Forms]![Therapistlocator]![BySname]
Is Null
In County:
[Forms]![Therapistlocator]![ByCounty] Or
[Forms]![Therapistlocator]![ByCounty] Is Null
In Town:
[Forms]![Therapistlocator]![ByTown] Or [Forms]![Therapistlocator]![ByTown]
Is Null
In the PostCode field in the table, the postcodes are xxx xxx, so because I
want search only on the first two letters, I created another field like so:
Expr1: Left([PostCode],2)
In the criteria for this, I've put:
[Forms]![Therapistlocator]![ByPCode] Or [Forms]![Therapistlocator]![ByPCode]
Is Null
Nothing complicated, eh? But, when I run the form, I get zero records. When
I then go back to the query, Access has added about a dozen lines of extra
bits of the expressions all over the place, has truncated most of the
expressions, and has created about three new columns, all headed up with
bits of code!
If I only put criteria in one field, it seems to work but the minute I add
criteria to another field, it does it all over again. Is this a bug? Did MS
get it wrong in their article? I've tried it on another machine and still
get the same problem. Help!!!!
I'm using Microsoft Access 2002 SP-2
I know there's someone out there who can help...I'd be very grateful.
James.