Re: Access Shuts Down after Me.Form.Requery
From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 01/12/05
- Next message: Rick B: "Re: Event Question"
- Previous message: JamesK: "RE: Return Name Of Subform Control"
- In reply to: Slator: "Re: Access Shuts Down after Me.Form.Requery"
- Messages sorted by: [ date ] [ thread ]
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)
- Next message: Rick B: "Re: Event Question"
- Previous message: JamesK: "RE: Return Name Of Subform Control"
- In reply to: Slator: "Re: Access Shuts Down after Me.Form.Requery"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|