Re: Access Shuts Down after Me.Form.Requery

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 01/12/05


Date: Wed, 12 Jan 2005 16:34:42 -0500


"Slator" <Slator@discussions.microsoft.com> wrote in message
news:60C822CB-454C-47D8-B349-25465F8325C9@microsoft.com
> Q1 Answer = Yes, after the change the record does not meet the
> criteria.
> Q2 Answer = The code is in the form's class module.
> Q3 Answer = The form is "technically" updateable, meaning I have set
> the properties accordingly for the related
> objects.
> However, I do
> not know how to check to see if the form is
> "really" updateable,
> which is sometimes the case with Access but there
> is not a problem as long as the record processing
> can be resolved
> completely
> in memory.
> Q4 Answer = No, the form will still be displayed with no records to.
> NOTE: The form has been working for months prior
> to problem.
> Q5 Answer = No, Me.Requery and Me.form.Requery produce the same
> results.
>
>
> "Dirk Goldgar" wrote:
>>
>> Do I gather from your description that the function the user is
>> taking
>> on these records is changing them such that they no longer meet the
>> criteria to appear on the form?
>>
>> Where and in what event is this code to requery the form being
>> executed?
>>
>> Is the form from which you are (I gather) removing records by this
>> code nonupdatable? I'm wondering if it has anything to do with the
>> form becoming totally blank, as they do when there are no records to
>> display
>> and no records can be added.
>>
>> Does it make any difference if you execute Me.Requery instead of
>> Me.Form.Requery? The former is more usual.

Possibly the form has become corrupted somehow. Try decompiling the
database and see if the problem goes away. Here's how:

1. With the database closed -- no users in it at all -- and (ideally)
Access not running, make a backup copy.

2. On the task bar, click Start -> Run...

3. Enter this (adapted match your database path and name) in the Run
dialog box and click OK:

    msaccess.exe /decompile "C:\My Documents\YourDBName.mdb"

You may need to include the full path to msaccess.exe, but I don't find
that to be the case when I try it. Depending on your Access version,
you may not get any sign that anything in particular happened. Your
database will probably open in Access.

4. Compact and Repair your database.

5. Open the database again, press Alt+F11 to switch to the VB Editor,
and click Debug -> Compile (your project). If any errors appear, fix
them and recompile.

6. Close the VB Editor. Compact & Repair again.

See if the problem has disappeared.

-- 
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)


Relevant Pages

  • Re: improving performance by indexing query criteria fields
    ... establish relationships first in the relationships window. ... My advice is to index fields that you use to specify criteria and sort orders. ... important in a multi-user database, where the back-end is on a file server. ... appropriate records (assuming the query optimizer can use the index). ...
    (microsoft.public.access.setupconfig)
  • Re: improving performance by indexing query criteria fields
    ... establish relationships first in the relationships window. ... My advice is to index fields that you use to specify criteria and sort orders. ... important in a multi-user database, where the back-end is on a file server. ... appropriate records (assuming the query optimizer can use the index). ...
    (microsoft.public.access.queries)
  • Re: Find largest alphanumeric value matching alpha criteria in dat
    ... the "Calif Insert" is a changing criteria that I need to be ... able to input in a cell. ... then go to the database to find all the records that also contain that same ... refers to the database and to a cell on the template: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Showing certain record only
    ... In my database I have a toggle button that once pressed ... My Main form is called frmProject which gets it data from a query ... unbound textbox, txtZeros. ... I add the following criteria to the filtering query for the listbox, ...
    (microsoft.public.access.forms)
  • Re: Lets start again
    ... The free downloadable sample database at www.bullschmidt.com/access uses the ... query by form concept so that on the invoices dialog one can optionally choose ... InvDateMin with DefaultValue of =DateSerial)-1,1,1) ... And the qryInv query's criteria for the InvDate field has: ...
    (microsoft.public.access.gettingstarted)