G
Gillian
Hi
I posted this question in the modules section and after some very helpful
dialogue i've been advised to re-post here.
I have been designing access databases for years but this problem has me
stumped.
I have a very small access 2003 database will only one form and a few
tables. On the form there is a button with the following code.
Option Compare Database
Option Explicit
Private Sub btnCreate_CloseRGs_Click()
DoCmd.SetWarnings False
DoCmd.Echo False
If IsNull(Me.txtCloseRGs_Location) Then
MsgBox ("You must fill in the folder to put the CloseRGs file in!!")
Me.txtCloseRGs_Location.SetFocus
Else
DoCmd.OpenQuery "qryClose_RGs_Temp_Delete"
DoCmd.OpenQuery "qryClose_RGs_Export_Delete"
DoCmd.OpenQuery "qryClose_RGs_Temp_Append"
DoCmd.OpenQuery "qryClose_RGs_Update_1"
DoCmd.OpenQuery "qryClose_RGs_Update_2"
DoCmd.OpenQuery "qryClose_RGs_Update_3"
DoCmd.OpenQuery "qryClose_RGs_Export_Append"
DoCmd.TransferText acExportDelim, "CloseRGs_Export_Spec",
"Close_RGs_Export", _
"G:\DONOR CARE TEAM\Committed Givers\Reactivate Monthly Data\" &
Me.txtCloseRGs_Location & "\CloseRGs.csv"
MsgBox "The CloseRGs file has been generated"
End If
End Sub
I have used this type of code in a hundred different place with no problems
but in this application no matter whether you trigger the if or the else
after finishing working through the code Access crashes completely.
I don't get an error it just dies and i have to ctrl-alt-del out.
I have tried a rebuild, compact/repair, decompile, re-created the sub from
scratch, uninstalled access and reinstalled, uninstalled the whole office
suite and reinstalled. It still crashes!!
This is really bugging as it's the simplest database i've created in about
10 years and i can't get it to work.
I'm sure it's not the code as i've followed it through using breakpoint and
it works perfectly gets to the end sub perfectly and then the application has
hung behind it.
Any help would be greatly appreciated.
Thanks
I posted this question in the modules section and after some very helpful
dialogue i've been advised to re-post here.
I have been designing access databases for years but this problem has me
stumped.
I have a very small access 2003 database will only one form and a few
tables. On the form there is a button with the following code.
Option Compare Database
Option Explicit
Private Sub btnCreate_CloseRGs_Click()
DoCmd.SetWarnings False
DoCmd.Echo False
If IsNull(Me.txtCloseRGs_Location) Then
MsgBox ("You must fill in the folder to put the CloseRGs file in!!")
Me.txtCloseRGs_Location.SetFocus
Else
DoCmd.OpenQuery "qryClose_RGs_Temp_Delete"
DoCmd.OpenQuery "qryClose_RGs_Export_Delete"
DoCmd.OpenQuery "qryClose_RGs_Temp_Append"
DoCmd.OpenQuery "qryClose_RGs_Update_1"
DoCmd.OpenQuery "qryClose_RGs_Update_2"
DoCmd.OpenQuery "qryClose_RGs_Update_3"
DoCmd.OpenQuery "qryClose_RGs_Export_Append"
DoCmd.TransferText acExportDelim, "CloseRGs_Export_Spec",
"Close_RGs_Export", _
"G:\DONOR CARE TEAM\Committed Givers\Reactivate Monthly Data\" &
Me.txtCloseRGs_Location & "\CloseRGs.csv"
MsgBox "The CloseRGs file has been generated"
End If
End Sub
I have used this type of code in a hundred different place with no problems
but in this application no matter whether you trigger the if or the else
after finishing working through the code Access crashes completely.
I don't get an error it just dies and i have to ctrl-alt-del out.
I have tried a rebuild, compact/repair, decompile, re-created the sub from
scratch, uninstalled access and reinstalled, uninstalled the whole office
suite and reinstalled. It still crashes!!
This is really bugging as it's the simplest database i've created in about
10 years and i can't get it to work.
I'm sure it's not the code as i've followed it through using breakpoint and
it works perfectly gets to the end sub perfectly and then the application has
hung behind it.
Any help would be greatly appreciated.
Thanks