D
Dennis
Hi,
I've not had a good weekend. This form is driving me crazy.
Initially, when I change the form, it would crash Access. So I followed
Allen Browne's advice in another question in this forum:
1. Uncheck the boxes under Tools | Options | General | Name AutoCorrect
2. Compact the database: Tools | Database Utilities | Compact/Repair
3. Close Access.
Make a backup copy of the file.
Decompile the database
4. Open Access and compact again.
5. Try exporting the form using SaveAsText acForm, "Form1", "C:\form1.txt"
Verify that this created a text file in the specified folder.
Then delete the form, and compact again.
Recreate the form with: LoadFromText acForm, "Form1", "C:\form1.txt"
That worked for a short while, but as I made more changes, it just crashed
the form again.
So I copied the code into a notepad entry and delete the form and compacted
the db again.
I then recreated the form from scratch. So far so good. I got the basic
form working just fine (without the code). I then copied the code from the
notepad into the form's code window. When I ran the form, I received the
error message:
"The expression On Current you entered as the event property setting
produced the following error: User-defined type not defined."
So I deleted all of the code. Then I entered the following code for the
Form's Open event:
Private Sub Form_Current()
' This is a test
End Sub
I then tried running the form again and received the same error message.
I've gone beyond ripping my hair out. I really don't want to start baning
my head against the wall. Does anyone have any suggestions?
I've not had a good weekend. This form is driving me crazy.
Initially, when I change the form, it would crash Access. So I followed
Allen Browne's advice in another question in this forum:
1. Uncheck the boxes under Tools | Options | General | Name AutoCorrect
2. Compact the database: Tools | Database Utilities | Compact/Repair
3. Close Access.
Make a backup copy of the file.
Decompile the database
4. Open Access and compact again.
5. Try exporting the form using SaveAsText acForm, "Form1", "C:\form1.txt"
Verify that this created a text file in the specified folder.
Then delete the form, and compact again.
Recreate the form with: LoadFromText acForm, "Form1", "C:\form1.txt"
That worked for a short while, but as I made more changes, it just crashed
the form again.
So I copied the code into a notepad entry and delete the form and compacted
the db again.
I then recreated the form from scratch. So far so good. I got the basic
form working just fine (without the code). I then copied the code from the
notepad into the form's code window. When I ran the form, I received the
error message:
"The expression On Current you entered as the event property setting
produced the following error: User-defined type not defined."
So I deleted all of the code. Then I entered the following code for the
Form's Open event:
Private Sub Form_Current()
' This is a test
End Sub
I then tried running the form again and received the same error message.
I've gone beyond ripping my hair out. I really don't want to start baning
my head against the wall. Does anyone have any suggestions?