Thanks for your reply, but the only thing in my query is criteria. Is there
a way to attach or send my form so that you could get a better idea? I
really don't know how to describe it. It is a form that performs an export
function. I can preview my query just fine using those filters but when I
hit export I am prompted again. Here's my code:
Private Sub cmdUpload_Click()
On Error GoTo Err_Upload_Click
Application.ExportXML acExportQuery, EDMISfile, txtUpload, Schema
MsgBox txtUpload & " written..."
Exit Sub
Err_Upload_Click:
MsgBox Err.Description
End Sub
Private Sub comEDMIS_AfterUpdate()
On Error GoTo Err_EDMIS
EDMISfile = "qryForm641"
Select Case comEDMIS.Value
Case "Form 641"
txtUpload = "c:\Form641.xml"
Schema = "c:\form641schema.xsd"
EDMISfile = "qryForm641"
txtBegClient.Enabled = True
txtEndClient.Enabled = True
FY.Enabled = False
Year1.Enabled = False
Case "Form 641A"
txtUpload = "\\Server01\bdata\EDMIS\Form641A.xml"
EDMISfile = "qryForm641A"
txtBegClient.Enabled = True
txtEndClient.Enabled = True
FY.Enabled = False
Year1.Enabled = False
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryMakeTcounsel"
DoCmd.OpenQuery "qrycombine"
DoCmd.SetWarnings True
Case "Form 888"
txtUpload = "\\Server01\bdata\EDMIS\Form888.xml"
EDMISfile = "qryForm888"
ExportSpec = "Form888_Export_Specification"
txtBegClient.Enabled = False
txtEndClient.Enabled = False
FY.Enabled = False
Year1.Enabled = False
Case "Form 2226"
DoCmd.OpenForm "frm2226"
txtUpload = "\\Server01\bdata\EDMIS\InformationTransfer.xml"
EDMISfile = "qryform2226"
txtBegClient.Enabled = False
txtEndClient.Enabled = False
FY.Enabled = True
Year1.Enabled = True
End Select
txtUpload.Enabled = True
Exit Sub
Err_EDMIS:
MsgBox Err.Description
End Sub
Private Sub Command9_Click()
MsgBox "To add the document to the EDMIS database you must go to the
EDMIS upload site which is......"
End Sub
Private Sub Form_Close()
DoCmd.Close acForm, "frm2226"
End Sub
Private Sub Form_Load()
On Error GoTo Err_formopen
Dim begclient, endclient
txtBegClient = DMin("[client Id]", "tblclientcontactinfo")
txtEndClient = DMax("[client Id]", "tblclientcontactinfo")
BegClientID = txtBegClient.Value
EndClientID = txtEndClient.Value
txtUpload.Enabled = False
txtBegClient.Enabled = True
txtEndClient.Enabled = True
Exit Sub
Err_formopen:
MsgBox Err.Description
End Sub
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click
DoCmd.Close
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
I am having problems with the fy, year 1 and the txtbegclient/txtend client.
These filters are not used for each 'case'.