Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Messages on saving query.

Status
Not open for further replies.

Chyld

Programmer
Jul 25, 2001
48
GB
I am running windows 98 se, access 2000

on my database

one query brings up all the customers from a table 'customer details' and lists them i.e.
company_name
town
postcode
customer_type (choice of 4 types)

this is displayed as 'testcustomerdetails' subform which sits on the 'testsample' unbound form.

the query for the customer details has an extra column that extracts the first part of the customers postcode, not including the "space", i.e. HX3 6ET would become 'HX3' and displays that too.

this is done via the following
Company Name
Town
Postcode
Customer_type
Post Area: Left([Postcode],InStr([Postcode]," ")-1)

I am then running a second query 'rep_against_area' that looks at the 'testcustomerdetails' form where all this info is displayed and calculates who the area representative should be based on the 'post area' extracted bit.

the 'rep_against_area' query looks like the following:

Rep: iif(left([forms]![testsample]![testcustomerdetails]![customer_type],3)="Bui", [personnel].[firstname] & " " & [personnel].[lastname], iif(left([forms]![testsample]![testcustomerdetails]![customer_type],3)="Con", [personnel_1].[firstname] & " " & [personnel_1].[lastname], iif(left([forms]![testsample]![testcustomerdetails]![customer_type],3)="Dom", [personnel].[firstname] & " " & [personnel].[lastname], [personnel_2].[firstname] & " " & [personnel_2].[lastname])))

Postcode(criteria)
like [forms]![testsample]![testcustomerdetails]![Post Area]

the above info is derived from the below table:

Postcode BuiRep ConRep ProRep
HX3 Joe Bloggs Mr Peters Jacko
TD15 Jimmy Boy Jepson Sunderland Mr.

only problem is, when I try to save the query, it gives me a bloody error message and shuts down!

I have the thought that my second query doesn't like that extracted postcode bit and starts flapping...

any comments? (making it easier would be a start!)

here is the error message:

can anyone explain why this happens when I try to save a query?

MSACCESS caused an invalid page fault in
module <unknown> at 0000:1539d233.
Registers:
EAX=300116f8 CS=0177 EIP=1539d233 EFLGS=00010246
EBX=300116f8 SS=017f ESP=00530058 EBP=00530078
ECX=005300fc DS=017f ESI=8177536c FS=3b37
EDX=bff76855 ES=017f EDI=005301f0 GS=0000
Bytes at CS:EIP:

Stack dump:
bff76849 005301f0 300116f8 00530124 005300fc 005304dc bff76855 300116f8 0053010c bff87fe9 005301f0 300116f8 00530124 005300fc 1539d233 00530264
-----------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top