Form class module for non-existent form - how remove?

Hi,

After copying a form with a class module, something went wrong. I now 
have a class module for the new form, but the form no longer exists. I 
am unable to remove the in-limbo class module. I want to use that name 
for my form, which is not possible as long as that class module is in 
the way.

How do I get rid of the in-limbo class module?

I've tried repairing tha DB as well as "msaccess /decompile" but it 
hasn't helped.

Anything else?

Thanks,
Kjell
0
Kjell
2/4/2008 7:49:47 AM
access.formscoding 7493 articles. 0 followers. Follow

8 Replies
2101 Views

Similar Articles

[PageSpeed] 15

Kjell,
A class module is not part of a form, but a separate module. It sounds like 
your 'in-limbo' module is in reality a class module.
Go to the modules tab in the database window. Find the module and rename it 
by selecting it and typing in the new name - for example ModA.
Go back to the forms tab and create the form you want.

Jeanette Cunningham

"Kjell Rilbe" <kjell.no@spam.rilbe.se> wrote in message 
news:eppVGKwZIHA.4208@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> After copying a form with a class module, something went wrong. I now have 
> a class module for the new form, but the form no longer exists. I am 
> unable to remove the in-limbo class module. I want to use that name for my 
> form, which is not possible as long as that class module is in the way.
>
> How do I get rid of the in-limbo class module?
>
> I've tried repairing tha DB as well as "msaccess /decompile" but it hasn't 
> helped.
>
> Anything else?
>
> Thanks,
> Kjell 


0
Jeanette
2/4/2008 11:03:47 AM
Thanks, but that's not it. The VBA editor lists the module under the 
form modules folder and its name is like "Form_..." and it is NOT listed 
in the Modules folder of the DB window.

The module IS (at least was) part of a form that I copied under a new 
name to create new similar form. I think the first symptom that 
something went wrong was that when I clicked the ... button next to the 
event property name of one of the events, with code allready attached, 
Access said something about no guide existing for this operation. Then 
the code win opened like everything was ok, but it opened a different 
form's code window. Not even the one I copied from, but a TOTALLY 
different form. Then, I can't open the code of the copy (the copied 
form, not the original). It says there's a network error or some such. 
Not able to find the "file".

I can delete the copy (the form) and create a new blank form with the 
same name, but when I try to attach code, it starts over again. When I 
delete the form, the class module is still listed under the forms folder 
in the VBA editor.

This seems to have happened to other people too, because I found a few 
forum Q:s on the web. One reply suggested the /decompile switch 
(undocumented), but it didn't help.

I've now gone back to a backup and copied the form "manually" instead. 
I.e. creating a new form from scratch. A lot more work, but no bugs 
roaring ugly faces at me.

Still, I'd like to see how I could repair this when it happens. It's 
bound to happen again, because I often copy forms.

Thanks,
Kjell

Jeanette Cunningham wrote:

> Kjell,
> A class module is not part of a form, but a separate module. It sounds like 
> your 'in-limbo' module is in reality a class module.
> Go to the modules tab in the database window. Find the module and rename it 
> by selecting it and typing in the new name - for example ModA.
> Go back to the forms tab and create the form you want.
> 
> Jeanette Cunningham
> 
> "Kjell Rilbe" <kjell.no@spam.rilbe.se> wrote in message 
> news:eppVGKwZIHA.4208@TK2MSFTNGP04.phx.gbl...
> 
>>Hi,
>>
>>After copying a form with a class module, something went wrong. I now have 
>>a class module for the new form, but the form no longer exists. I am 
>>unable to remove the in-limbo class module. I want to use that name for my 
>>form, which is not possible as long as that class module is in the way.
>>
>>How do I get rid of the in-limbo class module?
>>
>>I've tried repairing tha DB as well as "msaccess /decompile" but it hasn't 
>>helped.
>>
>>Anything else?
>>
>>Thanks,
>>Kjell 
> 
> 
> 
0
Kjell
2/4/2008 11:29:21 AM
I have encountered the same thing (i think). I treated it as a symptom of 
possible database corruption. I created a new, blank database and imported 
all objects into it. The offending form module entry did not survive the 
trip, presumably because there was no corresponding form.

-- 
HTH,
George


"Kjell Rilbe" <kjell.no@spam.rilbe.se> wrote in message 
news:O3f$yEyZIHA.5768@TK2MSFTNGP03.phx.gbl...
> Thanks, but that's not it. The VBA editor lists the module under the form 
> modules folder and its name is like "Form_..." and it is NOT listed in the 
> Modules folder of the DB window.
>
> The module IS (at least was) part of a form that I copied under a new name 
> to create new similar form. I think the first symptom that something went 
> wrong was that when I clicked the ... button next to the event property 
> name of one of the events, with code allready attached, Access said 
> something about no guide existing for this operation. Then the code win 
> opened like everything was ok, but it opened a different form's code 
> window. Not even the one I copied from, but a TOTALLY different form. 
> Then, I can't open the code of the copy (the copied form, not the 
> original). It says there's a network error or some such. Not able to find 
> the "file".
>
> I can delete the copy (the form) and create a new blank form with the same 
> name, but when I try to attach code, it starts over again. When I delete 
> the form, the class module is still listed under the forms folder in the 
> VBA editor.
>
> This seems to have happened to other people too, because I found a few 
> forum Q:s on the web. One reply suggested the /decompile switch 
> (undocumented), but it didn't help.
>
> I've now gone back to a backup and copied the form "manually" instead. 
> I.e. creating a new form from scratch. A lot more work, but no bugs 
> roaring ugly faces at me.
>
> Still, I'd like to see how I could repair this when it happens. It's bound 
> to happen again, because I often copy forms.
>
> Thanks,
> Kjell
>
> Jeanette Cunningham wrote:
>
>> Kjell,
>> A class module is not part of a form, but a separate module. It sounds 
>> like your 'in-limbo' module is in reality a class module.
>> Go to the modules tab in the database window. Find the module and rename 
>> it by selecting it and typing in the new name - for example ModA.
>> Go back to the forms tab and create the form you want.
>>
>> Jeanette Cunningham
>>
>> "Kjell Rilbe" <kjell.no@spam.rilbe.se> wrote in message 
>> news:eppVGKwZIHA.4208@TK2MSFTNGP04.phx.gbl...
>>
>>>Hi,
>>>
>>>After copying a form with a class module, something went wrong. I now 
>>>have a class module for the new form, but the form no longer exists. I am 
>>>unable to remove the in-limbo class module. I want to use that name for 
>>>my form, which is not possible as long as that class module is in the 
>>>way.
>>>
>>>How do I get rid of the in-limbo class module?
>>>
>>>I've tried repairing tha DB as well as "msaccess /decompile" but it 
>>>hasn't helped.
>>>
>>>Anything else?
>>>
>>>Thanks,
>>>Kjell
>>
>> 

0
George
2/4/2008 5:25:05 PM
George,

Interesting! Did you do this in some kind of automated manner? Something 
smoother than copy+paste for each item?

Thanks,
Kjell

George Nicholson wrote:

> I have encountered the same thing (i think). I treated it as a symptom of 
> possible database corruption. I created a new, blank database and imported 
> all objects into it. The offending form module entry did not survive the 
> trip, presumably because there was no corresponding form.
0
Kjell
2/4/2008 10:27:37 PM
What do you mean by copying "a form with a class module"? Do you mean you
copy the form's class module (not the Access Class module) code's into the
VBA editor with copy and paste?

You must use the database window objects(Forms). Copy the form and wizard
will prompt you for a new name. This will also copy the form's class module's
code.

Kjell Rilbe wrote:
>Hi,
>
>After copying a form with a class module, something went wrong. I now 
>have a class module for the new form, but the form no longer exists. I 
>am unable to remove the in-limbo class module. I want to use that name 
>for my form, which is not possible as long as that class module is in 
>the way.
>
>How do I get rid of the in-limbo class module?
>
>I've tried repairing tha DB as well as "msaccess /decompile" but it 
>hasn't helped.
>
>Anything else?
>
>Thanks,
>Kjell

-- 
Please Rate the posting if helps you

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200802/1

0
AccessVandal
2/5/2008 2:05:52 AM
That's what I did. But something went wrong and the connection between 
the form and the associated class module is somehow broken. In fact, it 
seems like the code didn't get copied at all, only a reference to "it" 
(where "it" is void, which it shouldn't be).

Kjell

AccessVandal via AccessMonster.com wrote:

> What do you mean by copying "a form with a class module"? Do you mean you
> copy the form's class module (not the Access Class module) code's into the
> VBA editor with copy and paste?
> 
> You must use the database window objects(Forms). Copy the form and wizard
> will prompt you for a new name. This will also copy the form's class module's
> code.
> 
> Kjell Rilbe wrote:
> 
>>After copying a form with a class module, something went wrong. I now 
>>have a class module for the new form, but the form no longer exists. I 
>>am unable to remove the in-limbo class module. I want to use that name 
>>for my form, which is not possible as long as that class module is in 
>>the way.
>>
>>How do I get rid of the in-limbo class module?
>>
>>I've tried repairing tha DB as well as "msaccess /decompile" but it 
>>hasn't helped.
0
Kjell
2/5/2008 8:13:19 AM
That's odd. The only thing that I can come up is your PC hardware issue (your
RAM) or there might be another software running in the background. If there
aren't any of this like virus/trojen, I out of ideas.

Kjell Rilbe wrote:
>That's what I did. But something went wrong and the connection between 
>the form and the associated class module is somehow broken. In fact, it 
>seems like the code didn't get copied at all, only a reference to "it" 
>(where "it" is void, which it shouldn't be).
>
>Kjell

-- 
Please Rate the posting if helps you

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200802/1

0
AccessVandal
2/5/2008 10:16:37 AM
-Create a new empty database.
-Be sure Tools>Options>AutoCorrect is OFF

-File>GetExternalData>Import.
-Select All: Tables (except those starting with 
"Msys")>Queries>Forms>Reports>Macros>Modules, etc. "OK"

-Check & Set References in the VBE, as necessary. Compile
-Reset Tools>Startup, as necessary.

-- 
HTH,
George


"Kjell Rilbe" <kjell.no@spam.rilbe.se> wrote in message 
news:%23ZIJn03ZIHA.4712@TK2MSFTNGP04.phx.gbl...
> George,
>
> Interesting! Did you do this in some kind of automated manner? Something 
> smoother than copy+paste for each item?
>
> Thanks,
> Kjell
>
> George Nicholson wrote:
>
>> I have encountered the same thing (i think). I treated it as a symptom of 
>> possible database corruption. I created a new, blank database and 
>> imported all objects into it. The offending form module entry did not 
>> survive the trip, presumably because there was no corresponding form. 


0
George
2/5/2008 6:05:15 PM
Reply:

Similar Artilces:

Autonumber in a form
I have a form that allows data entry and additions only. What I would like to do is have the record number pop up in a field on the form. Im not sure how to write the code for the event procedure to be able to do this. What would be convienient is that the number would pop up as soon as the form is opened. any suggestions? Tyler Perhaps you and I have a different understanding of "Autonumber"... The Access Autonumber is a system-generated unique key value, whose only (OK, whose primary) use is as a unique row identifier. Since you have no control over the value Access come...

Problems filling data into custom field on Account form
I'm having some problems appending a value to a field by using Javascript in ONLOAD on the Account form. In a custom form I've created, however, I don't have that problem. In that form I use this simple code in ONLOAD, and it works fine: crmForm.all.fieldname.DataValue = 'TEXT'; In the Account form however, in ONLOAD I try to fill a custom field with some text using exactly the same code, but it doesn't work - the field remains empty. I have admin rights, so I guess that's not the problems. Both fields are "nvarchar>text". I hope there's a...

Some forms and swithboards in design view show up blank in form vi
I'm a financial analyst, expert excel user, and began using Access 3 months ago to solve a specific problem. Following along with Jeff Conrad's book, I wrestled with the concepts until I had a fairly servicable application designed to replace a couple of hundred spreadsheets and versions thereof. I also built considerable strength hauling the book to and from the office, in its own briefcase, everyday. The result is better than I expected and especially efficient in consolidating calculations that, until now, could only be done across a tedious network of linked worksheet...

Updating New Record form
Hi, I have two tables set up: tblDeals and tblEquip, they have one field in common called: DealCode. I have a query qryEquip that links the two tables based on the DealCode field and adds other tblDeals fields like Customer, Description, etc, to help identify the deal but only the DealCode is stored in the Equip table. Form frmEquip is based on query qryEquip and it is working fine. Here’s what I’m trying to do: When I add a new Equip record I want to be able to look into the tblDeals for the right deal and then pass the DealCode to the frmEquip, then have the frmEquip pull the rest o...

Bind a Form to a Recordset
I am trying to bind a form to a record set using access 2003. However, I can not edit the data in the form. I made sure that the record locks are set correctly. Does anyone know how to bind a recordset to a form and allow the records to be edited (i.e. not read only)? I used the following code: Note: the "frm" and "rst" ojects are defined as public variables in a module. Private Sub btn_Click() Set frm = New Form_TestForm Set rst = New ADODB.Recordset rst.Open "testTable", CurrentProject.Connection, adOpenKeyset, adLockOptimistic Set frm.Recordse...

Creating a transparent background for a radio button on my form
I am using Word to create a form. I used the Legacy Controls to add radio buttons to the form. The radio buttons are in a table with a colored background. While in Design Mode, I went into the radio button properties and set the BackStyle to '0 - fmBackStyleTransparent' and the background seemed to become transparent. However, as soon as I leave Design Mode the radio button's default to a white background on top of my colored table cells. And at this point, the white background seems to write over the table borders making for a very messy appearance. Does a...

Form locking up
I've completed my own Linked Table Manager wizard, so that the connections I create to SQL Server and Oracle database on my network don't require a DSN (DSN-less connections). This wizard exists in its own mda file, which I have added as a reference in several of my databases. In my test database, this wizard runs great. I've got a command button that calls a function (fnRefreshLinks) that exists in the wizard. It opens a form, refreshes a list of the linked tables, tests the link, and provides me with some options. When I run this same function from another database, it...

THIS_FILE' : redefinition; different storage class while changing setting from /MD to /MDD
Hi, I working in finding out the memory leak in the application which was developed in vc++2005. I am using _CrtMemCheckpoint function to find out the memory leak these function will be working only when the application is in debug mode and the project setting should in /MDD or /MTD . When ever I change my setting from /MD to /MDD I get a compiler error Error 251 error C2370: 'THIS_FILE' : redefinition; different storage class i.e error is at #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE #pragma once static char THIS_FILE[] = __FILE__; #endif ...

Publishing forms to Organizational Forms
When publishing a form to organizational forms I get the following error message. There are no articles in the KB. "an error occurred while going to this folder" Exchange 2000 Outlook 2002 All permissions have been checked and are okay. If there are any REAL ideas about what is going on in Exchange, please post a reply. Thanks to all! ...

refreshing form
I have a form with a combo box field that references a table so we can keep information in the field uniform (i.e. "Place",not "Pl."). At times when filling out the form there is a new word not in the table being refereced to by the combo box. From the main input form, I select a button named "DB Admin"; it opens a form with buttons to all the different tables containing information that we want to keep uniform. I open the form for the referenced table, add the new word, close the form, and close the "DB Admin form". I am now back to the main input ...

Form warning
Hello, I have Office XP with SP-2. When I try to open a contact which has a special form that I designed, it gives this message first : This form contains an activex control which may be harm to open on this computer ...... and then askes yes or no, is there any way to disable this warning assuming it is always yes? thanx for any help I am having the same problem for a modified Calendar form. Did you get any replies on how to fix the problem? "M K W" wrote: > Hello, > I have Office XP with SP-2. > When I try to open a contact which has a special form that I designed, i...

Bind a Textbox in a Form
I have a table containing several Projects and its Phases. Now I need to create TextBoxes in a Form to return the totals for each phase. This means I need 3 TextBoxes: I made a query that Counts the total of projects in each phase: Query_Projects_Phases Phase CountOfPhase Pre-project 1 Portfolio 45 Execution 7 One TextBox would be bound to the "Pre Project" CountOfPhase field from the query (in this case the TextBox would show1); the other TextBox would be bound to "Portfolio" CountOfPhase field from the query (in this case the TextBox would ...

MFC Appwizard not allowing CHtmlView base class
I have Visual C++ 6.0 with Service Pack 5 installed. I have been trying to create a browser-like application as described in the MSDN Library by using the MFC Appwizard (exe version). The instructions indicate that in the last step of the Appwizard, select CHtmlView as the View base class from the dropdown list, but when I use reach this point, CHtmlView is never in the list of available base classes, no matter what settings I try. I am creating a SDI with Document/View Architecture support, as per the instructions in the MSDN Library. I have also performed a full reinstall of Visual C++an...

Word Content Controls Restricted Document Fill in forms
I have a word (2007) document that i need to restrict to fill in forms due to the need of Checkboxes. When i do restrict the document and try to edit the text in my Content Controls (Plain Text) i cannot start writing or editing it at all unless i step into it with my arrowkeys. If i do this once in any content control the rest starts working and i can start clicking on them and it allows me to edit it. My dropdownlist(wordname?) works fine though. Anyone have a clue bout how to solve this? or whats the problem? /Thanks in regards /Eric Hi Plaskdex I have the same ...

Selecting a Specific Record Form from a subform
I have a form with a subform that I want to select a field from and have it open another form with the data selected from the sub form. I was able to get the operation to work in the subform using the following: Under Parameters of the first field of the subform -- Open4Edit_StationInfo Open4Edit_StationInfo used the following command: FindRecord Find What: =[Forms]![Station Info Subform]![Call Sign] Match: Whole Field Match Case: No Search: All Search As Formatted: Yes Only Current Field: No Find First: Yes The above works when I run the form "Station Info...

OWA 2003 form-based authentication
Hi all, Can we undo the OWA 2003 form-based authentication? Even I unchecked the OWA 2003 form-based authentication in http vitual protocol, but is's still in effect. Thanks. Did you restart IIS (iisreset)? Nue "Jane" <Jane@discussions.microsoft.com> wrote in message news:BCFBE035-FFE4-4A02-B827-B33DE5954D51@microsoft.com... > Hi all, > > Can we undo the OWA 2003 form-based authentication? Even I unchecked the > OWA 2003 form-based authentication in http vitual protocol, but is's still > in effect. > > Thanks. > You probably have to...

Form On Load Code
Hello, I am trying to create an event where the code will look for no results after a query. If there are not results I want a prompt to ask the user to add Yes/No message box. Once they select either yes or no then I want the forms to open. I hope someone can help. Private Sub Form_Load() Dim rst As DAO.Recordset 'Specifies to User if no record found then add Set rst = Me.RecordsetClone If rst.RecordCount = 0 Then Dim Response As Integer Response = MsgBox("Agreement Not Found. Please make sure it was typed in Correctly. You may need to add the Record. Do you want to Add?"...

Updating in a Form with a Query assigned to the Form
I need to know how to make a form updatable when a query is assigned to the form. It tells me that the query needs to be updatable to allow fields to be updated. On Mon, 25 Feb 2008 12:26:01 -0800, Sorting in a Graph <SortinginaGraph@discussions.microsoft.com> wrote: >I need to know how to make a form updatable when a query is assigned to the >form. It tells me that the query needs to be updatable to allow fields to be >updated. A Form cannot make a non-updateable query into an updateable one. You need to fix the Query instead! Perhaps you could post the SQL view of the ...

finding last non empty cell in a column
I am trying to find the last used cell in a column and then select tha entire range. The activecell here is "B1". What is happening is th column I am working in has a blank cells within the column so when thi code runs it the selected range is from B1 down to the first blank cell I need it to go all the way to the last used cell in the column. Any suggestions? Range(ActiveCell, ActiveCell.End(xlDown)).Select Thanks, Crai -- cparson ----------------------------------------------------------------------- cparsons's Profile: http://www.excelforum.com/member.php?action=getinf...

How do I create a form in Excel that I can send to be filled out?
I want to create a form in Excel that I can send out so people can fill it out electronically and then send it back to me. I need lines in the form and when I add lines I have to widen the column and then it messes up the previous wording. I know it can be done but not sure if I have to protect it, create a template (how do I do that), or lock some of the cells. Help! For lines have you considered simply bottom borders? i.e. wording in A1 bottom borders on B1:E1 Or lines drawn from the Drawing Toolbar. No need to widen any columns. Save the workbook and send it out...

Class array problem
I have a class (stuff) with a m_name member. I can: stuff* pstuff; pstuff = new stuff; CString name = _T("Ralph"); pstuff.m_name = name; I can't: stuff* pstuff; pstuff = new stuff[3]; CString name = _T("Ralph"); *(pstuff+0)->m_name = name; I get an error C2440: '=': cannot convert from 'CString' to 'const WCHAR' why have things changed and what would be a good solution? -- Just Al I meant to use pstuff->m_name = name; in the I can: code -- Just Al "Al" wrote: > I have a class (stuff) with a m_name member. > I can: &...

Duplicating reocords from main form and subform receiving Runtime Error 3022
I am trying to develop a command button that will duplicate the main form and the subform information and save it to another record within the same tables. I used Allen Browne's program and modified it to fit my tables. At first it would copy the main form and not the subform data so I made some changes and now I am getting the Runtime error 3022. I have worked on this off and on for about 2 weeks. Any help on getting this to run will be greatly appreciated. Below is my code: Private Sub Command78_Click() 'On Error GoTo Err_Handler 'Purpose: Duplicate the main ...

Form Fields
I have created a form for use by others. I used the Text form fields format when creating the form, my problem is the main text in the form does not stay locked in place. When we try to type to fill in the form fields it moves the main body text. I have tried using the Document Protection tab and telling it to allow formatting only in the form fields but that still does not prevent the other text from moving. I did this in word 2007. Any idea on what to do to lock the main body in to allow filling in just the Form fields. Hi Michael, The simplest way to gain control over the ...

Removing Exchange?
Hi, If I plan on removing an Exchange box from my domain can I simply run uninstall on Exchange and then remove the box from the domain and call it a day? The box is a simple domain member server and formerly functioned as my front end box. Anything special I sould be aware of? Thanks, Dan Aloha Dan, See if this helps: http://www.msexchange.org/tutorials/Remove-Exchange-server-entire-Exchange-organization.html -Ben- Ben M. Schorr - MVP http://www.rolandschorr.com Microsoft OneNote FAQ: http://www.factplace.com/onenotefaq.htm > Hi, > If I plan on removing an Exchange box from m...

Change or hide Form Group Box outline
Can I change the color of the Group Box outline. It is currently black, and I would want it white so it is invisible, or gray if I use a gray background. I am using it in XL2003 to put 2 Option buttons in. Thanks, Tonso You'll have to use VBA to make the groupbox invisible. activesheet.groupboxes.visible = false will work for a small (whatever that means) number of groupboxes. But if you have lots, you can use: dim GBX as groupbox for each GBX in activesheet.groupboxes gbx.visible = false next gbx On 01/09/2012 08:26, Tonso wrote: > Can I change the color of the Group Box o...