From: FJquestioner on
Steve,

I have a form with a subform. Queries within the subform depend on 3 of the
variables in the main form. Each time I open the main form I have it set to
go to a new record. However, if I close the form without entering any data, I
am asked to enter the variables expected by the queries within the subform.
If I press cancel, the entire Access system crashes with an error report sent
to Microsoft.

I've re-installed Access but to no avail.

Q1: Is there a way to avoid getting requests for query inputs when closing
an empty form?

Q2: If the answer to #1 is No, do you have any thoughts on how I can stop
the system from crashing upon closing this empty form ?

Thanks very much in advance.


From: Steve Schapel on
FJ,

Well, I think we will need to dig a bit deeper here. There is nothing
inherently in the concept of closing a form with a subform, without
entering a main form record, that could cause this behaviour. So, what
do you mean by "variables"? Can you post the SQL view of the query that
the subform is based on? Is there any code or macro on the Close or
Unload event of the main form? If so, any clues there? What is the
relationship between the main form and the subform? What is the
settings of the subform's Link Master Fields and Link Child Fields
properties? I assume you mean you are getting a "Enter Parameter Value"
dialog pop up... what are the parameters it is asking for?

--
Steve Schapel, Microsoft Access MVP

FJquestioner wrote:
> Steve,
>
> I have a form with a subform. Queries within the subform depend on 3 of the
> variables in the main form. Each time I open the main form I have it set to
> go to a new record. However, if I close the form without entering any data, I
> am asked to enter the variables expected by the queries within the subform.
> If I press cancel, the entire Access system crashes with an error report sent
> to Microsoft.
>
> I've re-installed Access but to no avail.
>
> Q1: Is there a way to avoid getting requests for query inputs when closing
> an empty form?
>
> Q2: If the answer to #1 is No, do you have any thoughts on how I can stop
> the system from crashing upon closing this empty form ?
>
> Thanks very much in advance.
>
>
From: FJquestioner on
OK. Here goes...

The main form is called Receipts. It contains several fields but 3 of them
are combo-boxes in which I select ASSIGNORID, DEBTORID and CURRENCY.
RECEIPTID is the auto-generated number key and is what ties it to the subform
called Receipts Subform. That subform has its own subform called "Receipts
Subform Invoices and Balances subform". The query for this form contains the
3 fields from the main form (ASSIGNORID, DEBTORID and CURRENCYID) and these
are the "Enter Parameter Value" requests that pop up whenever I close the
form. Although only the first one pops up and when I close it the whole
system crashes before the others appear in sequence.

The query for this second subform is as follows:

SELECT Format(Nz([Invoices Payments Received To Date]![SumOfAmount
Paid],0),"Currency") AS [Previous Payments],
Invoices!InvoiceAmount-Nz([Invoices Payments Received To Date]![SumOfAmount
Paid],0) AS Balance, Invoices.INVOICEID, Invoices.AssignorInvoiceNumber
FROM [Assignment Requests] INNER JOIN (Invoices LEFT JOIN [Invoices Payments
Received To Date] ON Invoices.INVOICEID = [Invoices Payments Received To
Date].INVOICEID) ON [Assignment Requests].ASSIGNMENTREQUESTID =
Invoices.ASSIGNMENTREQUESTID
WHERE (((Invoices.DEBTORID)=[Forms]![Receipts]![DEBTORID]) AND (([Assignment
Requests].ASSIGNORID)=[Forms]![Receipts]![ASSIGNORID]) AND (([Assignment
Requests].CURRENCYID)=[Forms]![Receipts]![Currency]) AND
((Invoices.Closed)=No))
ORDER BY Invoices.AssignorInvoiceNumber;

Just in case its of any value, the query for the first subform is:

SELECT [Receipt Allocations].RECEIPTALLOCATIONID, [Receipt
Allocations].RECEIPTID, [Receipt Allocations].INVOICEID, [Receipt
Allocations].ReceiptAllocation, [Receipt Allocations].ClosingReceipt,
Invoices.Closed, Invoices.DateClosed, Invoices.AssignorInvoiceNumber,
Invoices.CLOSEDHOWID, Invoices.GrossDiscFee, Invoices.ConsFee,
Invoices.RebatePayable
FROM Invoices INNER JOIN [Receipt Allocations] ON Invoices.INVOICEID =
[Receipt Allocations].INVOICEID
WHERE (((Invoices.Closed)=No))
ORDER BY Invoices.AssignorInvoiceNumber;



There is no macro associated with the closing of the main form but there is
a macro upon opening which sets the form to a new record and maximizes it.
However, that same macro is used on several other forms and causes no
problems.

Are you able to decipher anything from this?

Thanks.


"Steve Schapel" wrote:

> FJ,
>
> Well, I think we will need to dig a bit deeper here. There is nothing
> inherently in the concept of closing a form with a subform, without
> entering a main form record, that could cause this behaviour. So, what
> do you mean by "variables"? Can you post the SQL view of the query that
> the subform is based on? Is there any code or macro on the Close or
> Unload event of the main form? If so, any clues there? What is the
> relationship between the main form and the subform? What is the
> settings of the subform's Link Master Fields and Link Child Fields
> properties? I assume you mean you are getting a "Enter Parameter Value"
> dialog pop up... what are the parameters it is asking for?
>
> --
> Steve Schapel, Microsoft Access MVP
>
> FJquestioner wrote:
> > Steve,
> >
> > I have a form with a subform. Queries within the subform depend on 3 of the
> > variables in the main form. Each time I open the main form I have it set to
> > go to a new record. However, if I close the form without entering any data, I
> > am asked to enter the variables expected by the queries within the subform.
> > If I press cancel, the entire Access system crashes with an error report sent
> > to Microsoft.
> >
> > I've re-installed Access but to no avail.
> >
> > Q1: Is there a way to avoid getting requests for query inputs when closing
> > an empty form?
> >
> > Q2: If the answer to #1 is No, do you have any thoughts on how I can stop
> > the system from crashing upon closing this empty form ?
> >
> > Thanks very much in advance.
> >
> >
>
From: Steve Schapel on
FJ,

Thanks for the further details. However, this doesn't really make sense
to me so far. So, more questions I'm afraid!

When it "crashes" after prompting you for the AssignorID value, what
makes you think it is "planning" to ask for the others? Or do you mean
you get prompted for the DebtorID and CurrencyID, even after the crash?
(Which would be astounding). Does the Parameter Prompt ask for
'AssignorID', or does it ask for '[Forms]![Receipts]![AssignorID]'? And
this is happening when you close the main form, right? How are you
closing it?... the [x] at top right, or your own close button on the
form, or something else?

--
Steve Schapel, Microsoft Access MVP

FJquestioner wrote:
> OK. Here goes...
>
> The main form is called Receipts. It contains several fields but 3 of them
> are combo-boxes in which I select ASSIGNORID, DEBTORID and CURRENCY.
> RECEIPTID is the auto-generated number key and is what ties it to the subform
> called Receipts Subform. That subform has its own subform called "Receipts
> Subform Invoices and Balances subform". The query for this form contains the
> 3 fields from the main form (ASSIGNORID, DEBTORID and CURRENCYID) and these
> are the "Enter Parameter Value" requests that pop up whenever I close the
> form. Although only the first one pops up and when I close it the whole
> system crashes before the others appear in sequence.
>
> The query for this second subform is as follows:
>
> SELECT Format(Nz([Invoices Payments Received To Date]![SumOfAmount
> Paid],0),"Currency") AS [Previous Payments],
> Invoices!InvoiceAmount-Nz([Invoices Payments Received To Date]![SumOfAmount
> Paid],0) AS Balance, Invoices.INVOICEID, Invoices.AssignorInvoiceNumber
> FROM [Assignment Requests] INNER JOIN (Invoices LEFT JOIN [Invoices Payments
> Received To Date] ON Invoices.INVOICEID = [Invoices Payments Received To
> Date].INVOICEID) ON [Assignment Requests].ASSIGNMENTREQUESTID =
> Invoices.ASSIGNMENTREQUESTID
> WHERE (((Invoices.DEBTORID)=[Forms]![Receipts]![DEBTORID]) AND (([Assignment
> Requests].ASSIGNORID)=[Forms]![Receipts]![ASSIGNORID]) AND (([Assignment
> Requests].CURRENCYID)=[Forms]![Receipts]![Currency]) AND
> ((Invoices.Closed)=No))
> ORDER BY Invoices.AssignorInvoiceNumber;
>
> Just in case its of any value, the query for the first subform is:
>
> SELECT [Receipt Allocations].RECEIPTALLOCATIONID, [Receipt
> Allocations].RECEIPTID, [Receipt Allocations].INVOICEID, [Receipt
> Allocations].ReceiptAllocation, [Receipt Allocations].ClosingReceipt,
> Invoices.Closed, Invoices.DateClosed, Invoices.AssignorInvoiceNumber,
> Invoices.CLOSEDHOWID, Invoices.GrossDiscFee, Invoices.ConsFee,
> Invoices.RebatePayable
> FROM Invoices INNER JOIN [Receipt Allocations] ON Invoices.INVOICEID =
> [Receipt Allocations].INVOICEID
> WHERE (((Invoices.Closed)=No))
> ORDER BY Invoices.AssignorInvoiceNumber;
>
>
>
> There is no macro associated with the closing of the main form but there is
> a macro upon opening which sets the form to a new record and maximizes it.
> However, that same macro is used on several other forms and causes no
> problems.
>
> Are you able to decipher anything from this?
From: FJquestioner on
Steve,

Not sure if this will help but this is what appears on the top of the error
report I get when the system crashes.

AppName: msaccess.exe AppVer: 10.0.6771.0 ModName: msaccess.exe
ModVer: 10.0.6771.0 Offset: 000a90ad


To answer your questions...

The problem occurs whether I close the main form using the X or the macro
driven Close button within the form.

I don't know for sure that the system would prompt for all 3 of the
combo-box fields because as you noted, the system crashes after I cancel the
first prompt. However, if I re-arrange those fields within the query, the
prompt is for whichever field is left-most within the query (currently it
prompts for [Forms]![Receipts]![DEBTORID] ).

Also, I recently bought a new computer and loaded Office onto it (including
Access). I was having the problem of the promt appearing upon closing the
form on my old computer but I don't recall it causing a system crash.
However, I've re-installed Office using the "repair" mode at least 3 times
and the crashing problem persists.

I'm using WinXP and I also did a system restore at one point when I was
loading programs onto the new computer. That caused the Outlook program to
malfunction. However, the error notice identified the problem file (one of
the duplicate application files created by the restore function) and once I
deleted that file it worked fine.

So I suppose its possible that the Prompt problem is a programming problem
and the crash problem could be a software bug from my installation. However,
all other features of Access and all other Office programs seem to be working
fine.

But if I can eliminate the prompts then I needn't worry about the crashes.

Does any of this help with yur sleuthing?




"Steve Schapel" wrote:

> FJ,
>
> Thanks for the further details. However, this doesn't really make sense
> to me so far. So, more questions I'm afraid!
>
> When it "crashes" after prompting you for the AssignorID value, what
> makes you think it is "planning" to ask for the others? Or do you mean
> you get prompted for the DebtorID and CurrencyID, even after the crash?
> (Which would be astounding). Does the Parameter Prompt ask for
> 'AssignorID', or does it ask for '[Forms]![Receipts]![AssignorID]'? And
> this is happening when you close the main form, right? How are you
> closing it?... the [x] at top right, or your own close button on the
> form, or something else?
>
> --
> Steve Schapel, Microsoft Access MVP
>
> FJquestioner wrote:
> > OK. Here goes...
> >
> > The main form is called Receipts. It contains several fields but 3 of them
> > are combo-boxes in which I select ASSIGNORID, DEBTORID and CURRENCY.
> > RECEIPTID is the auto-generated number key and is what ties it to the subform
> > called Receipts Subform. That subform has its own subform called "Receipts
> > Subform Invoices and Balances subform". The query for this form contains the
> > 3 fields from the main form (ASSIGNORID, DEBTORID and CURRENCYID) and these
> > are the "Enter Parameter Value" requests that pop up whenever I close the
> > form. Although only the first one pops up and when I close it the whole
> > system crashes before the others appear in sequence.
> >
> > The query for this second subform is as follows:
> >
> > SELECT Format(Nz([Invoices Payments Received To Date]![SumOfAmount
> > Paid],0),"Currency") AS [Previous Payments],
> > Invoices!InvoiceAmount-Nz([Invoices Payments Received To Date]![SumOfAmount
> > Paid],0) AS Balance, Invoices.INVOICEID, Invoices.AssignorInvoiceNumber
> > FROM [Assignment Requests] INNER JOIN (Invoices LEFT JOIN [Invoices Payments
> > Received To Date] ON Invoices.INVOICEID = [Invoices Payments Received To
> > Date].INVOICEID) ON [Assignment Requests].ASSIGNMENTREQUESTID =
> > Invoices.ASSIGNMENTREQUESTID
> > WHERE (((Invoices.DEBTORID)=[Forms]![Receipts]![DEBTORID]) AND (([Assignment
> > Requests].ASSIGNORID)=[Forms]![Receipts]![ASSIGNORID]) AND (([Assignment
> > Requests].CURRENCYID)=[Forms]![Receipts]![Currency]) AND
> > ((Invoices.Closed)=No))
> > ORDER BY Invoices.AssignorInvoiceNumber;
> >
> > Just in case its of any value, the query for the first subform is:
> >
> > SELECT [Receipt Allocations].RECEIPTALLOCATIONID, [Receipt
> > Allocations].RECEIPTID, [Receipt Allocations].INVOICEID, [Receipt
> > Allocations].ReceiptAllocation, [Receipt Allocations].ClosingReceipt,
> > Invoices.Closed, Invoices.DateClosed, Invoices.AssignorInvoiceNumber,
> > Invoices.CLOSEDHOWID, Invoices.GrossDiscFee, Invoices.ConsFee,
> > Invoices.RebatePayable
> > FROM Invoices INNER JOIN [Receipt Allocations] ON Invoices.INVOICEID =
> > [Receipt Allocations].INVOICEID
> > WHERE (((Invoices.Closed)=No))
> > ORDER BY Invoices.AssignorInvoiceNumber;
> >
> >
> >
> > There is no macro associated with the closing of the main form but there is
> > a macro upon opening which sets the form to a new record and maximizes it.
> > However, that same macro is used on several other forms and causes no
> > problems.
> >
> > Are you able to decipher anything from this?
>