I have a form that I am unable to open. I had the form set to open on startup. It now will not open, even in design mode. I tried creating a form with a command button to open the form and it gives me an error code, "You canceled the previous operation." I tried copying the form and exporting the form. Neither work. All of the code for the form is still in the module. Any suggestions on how I open the form?
Thanks,
Jason
10 10994 NeoPa 32,556
Expert Mod 16PB
Try tracing the code of the form. Use Alt-F11 to switch to the debugger, then put a breakpoint in the code before trying to open the form normally. Trace through till you see why it is closing. See Debugging in VBA for detailed instructions.
I tried debugging. I also tried erasing all of the code in the form module. The form will still not open. I exported the entire database to another database but this form doesn't export and I cannot copy it.
Any other suggestions?
Thanks, Jason
NeoPa 32,556
Expert Mod 16PB
Sorry Jason. It sound like you have an unrecoverably corrupted form.
If you attach a copy (<= A2003 format) then I'll check it over for you, but my guess is that it's gone.
I've attached the database. One other thing that I noticed before this happened, my c drive was full and I was unable to save another word doc. I now have plenty of space on my hard drive but I'm wondering if this caused the issue.
Apparently not, assuming that I'm correct in thinking that the form named 1 is the one you're referring to.
I can do nothing with it; cannot open it, cannot go into Design View, and cannot import it into another database.
I'm afraid that NeoPa's guess is correct, and that the form is gone!
Sorry!
Welcome to Bytes!
Linq ;0)> @missinglinq
Same here:- compaction, decompilation and even running it through the Application.SaveAsText routine gave the 'reserved' error meaning it cannot write out the forms structure as text to an external file.
It is lost!
NeoPa 32,556
Expert Mod 16PB
I would be very confident that the lack of available space caused the corruption Jason. Unfortunately, if these boys have already found it beyond recovery, then my attempts are likely to find the same. I'll give it a go just because I promised to, but don't hold your breath. This is a dead parrot!
NeoPa 32,556
Expert Mod 16PB
Assuming the form referred to is 1 as Linq says, the code is not lost. I don't have it working of course, but hopefully the code is something to start with. - Option Compare Database
-
-
Private Sub abc_click()
-
Me.CustList = Null
-
Me.CustList.Requery
-
Me.CustList = Me.CustList.ItemData(0)
-
Me.quotelist = Null
-
Me.quotelist.Requery
-
Me.quotelist = Me.quotelist.ItemData(1)
-
Me.ContactList = Null
-
Me.ContactList.Requery
-
Me.ContactList = Me.ContactList.ItemData(1)
-
End Sub
-
-
-
Private Sub Command80_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "Update product names, customer numbers, add HAL personnel, etc..."
-
End Sub
-
-
Private Sub Command91_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "View reports on quotes, call reports, opportunites, contacts, etc..."
-
End Sub
-
-
Private Sub custlist_AfterUpdate()
-
Me.quotelist = Null
-
Me.quotelist.Requery
-
Me.quotelist = Me.quotelist.ItemData(1)
-
Me.ContactList = Null
-
Me.ContactList.Requery
-
Me.ContactList = Me.ContactList.ItemData(1)
-
Me.SalesPersonList = Null
-
Me.SalesPersonList.Requery
-
Me.SalesPersonList = Me.SalesPersonList.ItemData(1)
-
Me.CallReportList = Null
-
Me.CallReportList.Requery
-
Me.CallReportList = Me.CallReportList.ItemData(1)
-
-
-
End Sub
-
-
Private Sub NewCallReportCmd_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "These include phone conversations, office visits and are designed to share information."
-
End Sub
-
-
Private Sub NewContactCmd_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "Add a new contact. The company name must be entered prior to adding a contact for the company."
-
End Sub
-
-
Private Sub NewCustomerCmd_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "Add a new customer. You cannot add a quote or contact if the customer is not listed above."
-
End Sub
-
-
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = False
-
End Sub
-
-
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = False
-
End Sub
-
-
Private Sub Form_Open(Cancel As Integer)
-
If IsNull([Text69]) Then
-
[Option56].Visible = False
-
Else: [Option56].Visible = True
-
End If
-
-
If IsNull([Text94]) Then
-
[Option54].Visible = False
-
Else: [Option54].Visible = True
-
End If
-
-
If IsNull([Text93]) Then
-
[Option58].Visible = False
-
Else: [Option58].Visible = True
-
End If
-
-
If IsNull([Text102]) Then
-
[Option100].Visible = False
-
Else: [Option100].Visible = True
-
End If
-
-
If IsNull([Text103]) Then
-
[Option104].Visible = False
-
Else: [Option104].Visible = True
-
End If
-
-
DoCmd.OpenQuery "notactiveupdate"
-
-
End Sub
-
-
-
-
Private Sub NewQuote_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
[Help].Visible = True
-
[Help] = "Enter a new quote. Customers and contacts must be in the system prior to adding them to a quote."
-
End Sub
-
-
Private Sub origin1_click()
-
Me.quotelist = Null
-
Me.quotelist.Requery
-
Me.quotelist = Me.quotelist.ItemData(1)
-
-
End Sub
-
Private Sub activity_click()
-
Me.quotelist = Null
-
Me.quotelist.Requery
-
Me.quotelist = Me.quotelist.ItemData(1)
-
-
End Sub
-
-
-
Private Sub PreviewReport_Click()
-
-
-
On Error GoTo Err_PreviewReport_Click
-
-
Dim stDocName As String
-
-
stDocName = "quotes"
-
-
If IsNull(forms![1]![QLnum]) Then
-
MsgBox "You must select a quote to view the report."
-
Else
-
DoCmd.OpenReport stDocName, acPreview
-
-
End If
-
Exit_PreviewReport_Click:
-
Exit Sub
-
-
Err_PreviewReport_Click:
-
MsgBox Err.Description
-
Resume Exit_PreviewReport_Click
-
-
End Sub
-
-
-
Private Sub quotelist_DblClick(Cancel As Integer)
-
DoCmd.Close acReport, "quotes"
-
DoCmd.OpenReport "quotes", acPreview
-
End Sub
-
Private Sub EditQuote_Click()
-
On Error GoTo Err_EditQuote_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Quotes Form"
-
-
stLinkCriteria = "[Quote Number]=" & Me![QLnum]
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_EditQuote_Click:
-
Exit Sub
-
-
Err_EditQuote_Click:
-
MsgBox Err.Description
-
Resume Exit_EditQuote_Click
-
-
End Sub
-
Private Sub EditContact_Click()
-
On Error GoTo Err_EditContact_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Contacts Form"
-
-
stLinkCriteria = "[ContactID]=" & Me![ContactList]
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_EditContact_Click:
-
Exit Sub
-
-
Err_EditContact_Click:
-
MsgBox Err.Description
-
Resume Exit_EditContact_Click
-
-
End Sub
-
Private Sub NewQuote_Click()
-
On Error GoTo Err_NewQuote_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Quotes Form"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
-
-
-
Exit_NewQuote_Click:
-
Exit Sub
-
-
Err_NewQuote_Click:
-
MsgBox Err.Description
-
Resume Exit_NewQuote_Click
-
-
End Sub
-
Private Sub NewContactCmd_Click()
-
On Error GoTo Err_NewContactCmd_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Contacts Form"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
-
-
Exit_NewContactCmd_Click:
-
Exit Sub
-
-
Err_NewContactCmd_Click:
-
MsgBox Err.Description
-
Resume Exit_NewContactCmd_Click
-
-
End Sub
-
Private Sub NewCustomerCmd_Click()
-
On Error GoTo Err_NewCustomerCmd_Click
-
-
Dim stDocName As String
-
Dim stdocname2 As String
-
Dim stLinkCriteria As String
-
-
stDocName = "NewCustomer Form"
-
stdocname2 = "1"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
DoCmd.Close acForm, stdocname2, acSaveYes
-
-
Exit_NewCustomerCmd_Click:
-
Exit Sub
-
-
Err_NewCustomerCmd_Click:
-
MsgBox Err.Description
-
Resume Exit_NewCustomerCmd_Click
-
-
End Sub
-
Private Sub AddContact3_Click()
-
On Error GoTo Err_AddContact3_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Contacts Form"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
-
-
Exit_AddContact3_Click:
-
Exit Sub
-
-
Err_AddContact3_Click:
-
MsgBox Err.Description
-
Resume Exit_AddContact3_Click
-
-
End Sub
-
Private Sub NewCallReportCmd_Click()
-
On Error GoTo Err_NewCallReportCmd_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "CallReportForm"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
-
-
Exit_NewCallReportCmd_Click:
-
Exit Sub
-
-
Err_NewCallReportCmd_Click:
-
MsgBox Err.Description
-
Resume Exit_NewCallReportCmd_Click
-
-
End Sub
-
-
Private Sub TimeFrameOption_AfterUpdate()
-
Dim MySQL As String
-
Dim MyCriteria As String
-
MySQL = "SELECT CallReport.ID, CallReport.Numbername, CallReport.Date, CallReport.CallType, CallReport.EnteredBy, CallReport.CustomerContact, CallReport.OtherPersonnelAttending, CallReport.IssueDiscussed, CallReport.RequiresFollowUp, CallReport.FollowUpAssignedTo, CallReport.TypeOfFollowUpRequired FROM CallReport WHERE " & MyCriteria
-
-
Select Case Me!TimeFrameOption
-
Case Is = 1
-
MyCriteria = "[callreport].[numbername]=[custlist] and [CallReport].[Date] Between Date()-9999999999 And Date()ORDER BY CallReport.Date DESC"
-
Case Is = 2
-
MyCriteria = "[callreport].[numbername]=[custlist] and [CallReport].[Date] Between Date()-180 And Date()ORDER BY CallReport.Date DESC"
-
Case Is = 3
-
MyCriteria = "[callreport].[numbername]=[custlist] and [CallReport].[Date] Between Date()-365 And Date()ORDER BY CallReport.Date DESC"
-
End Select
-
-
Me!CallReportList.RowSource = MySQL & MyCriteria
-
-
End Sub
-
-
Private Sub CallReportEditCmd_Click()
-
On Error GoTo Err_CallReportEditCmd_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "CallReportForm"
-
-
stLinkCriteria = "[ID]=" & Me![CallReportList]
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_CallReportEditCmd_Click:
-
Exit Sub
-
-
Err_CallReportEditCmd_Click:
-
MsgBox Err.Description
-
Resume Exit_CallReportEditCmd_Click
-
-
End Sub
-
Private Sub ViewCallReportCmd_Click()
-
On Error GoTo Err_ViewCallReportCmd_Click
-
-
Dim stDocName As String
-
-
stDocName = "CallReportReport"
-
DoCmd.OpenReport stDocName, acPreview
-
-
Exit_ViewCallReportCmd_Click:
-
Exit Sub
-
-
Err_ViewCallReportCmd_Click:
-
MsgBox Err.Description
-
Resume Exit_ViewCallReportCmd_Click
-
-
End Sub
NeoPa 32,556
Expert Mod 16PB
I find I can do no more to recover anything I'm afraid.
NeoPa 32,556
Expert Mod 16PB
Some more advice for working in Access. I developed this for posting guidelines, but it's sound advice for working generally too : - Ensure you have Option Explicit set (See Require Variable Declaration).
- Try to compile it. If it doesn't compile for any reason please explain that clearly - including the error message and which line of your code it appears on. Compilation is done from the Visual Basic Editor menu - Debug \ Compile Project (Where Project is the actual name of your project).
These should help you find any problems earlier in the process. Good luck.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Matt |
last post by:
Is it possible to post form data and open an invisible window?
For example, in page1.as
<form action="page2.asp" method="POST"
It will post the form data from page1.asp to the server, and...
|
by: Amy Kalem |
last post by:
On our client database, we have two main forms - Personal Information
and Practice Information. We just upgraded to Office XP and now when I
try to enter a new client (I first input the personal...
|
by: Corepaul |
last post by:
I am working in Windows 2000 and Access 2000 and am a rookie in Access.
Coding merrily along, I stop periodically to test that everything works.
After adding a small amount of code to several...
|
by: John Warner |
last post by:
I have a wierd problem that I can't find any reference to in the
knowledge base. I develop simple databases at the company where I
work, and many of them are used by hundreds of employees. We all...
|
by: Mike Turco |
last post by:
A2003.
I haven't seen this before. You use File/New to create a new database in
Access and call it DB1. Close Access, click on db1, Access opens and there's
nothing there. Then I try opening the...
|
by: Regardt |
last post by:
Microsoft windows .Net 2003
I have a mayor problem! My property window won't open. I
tried using the dynamic help to open the property window,
but with out success. (The dynamic help window...
|
by: Regardt |
last post by:
Microsoft windows .Net 2003
I have a mayor problem! My property window won't open. I
tried using to dynamic help to open the property window,
but with out success. (The dynamic help window won't...
|
by: =?Utf-8?B?R3JlZw==?= |
last post by:
How can I tell via code if a Form is already open.
Each time my forms load I have some initialization code that runs, but if
the form is already open and hidden I don't want that initialization...
|
by: CAM |
last post by:
Hello,
I am using Visual Basic.Net 2008 I have created about 3 forms working OK in
the past, but now I doesn't work anymore. When I try to start to
run/debugging the program it starts to open...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |