Hi all,
Sometimes Access VBA programming makes me feel so stupid! I think that I'm doing what I should but it is not working!
I have a button on a form that does the following On Click
Private Sub DiveXML_Click()
Dim xmlname As String
Dim divename As String
divename = Me.diveID
xmlname = "C:\projectname\" & divename & ".xml"
Application.ExportXML ObjectType:=acExportQuery, _
DataSource:="FirstPassDiveInfo", _
DataTarget:=xmlname
MsgBox "Export operation completed successfully."
End Sub
FirstPassDiveInfo is a query which needs to use a value on that form as criteria for the query ([Forms]![CruiseDives]![diveID])
But when I click the button, it prompts me for the value [Forms]![CruiseDives]![diveID] instead of just getting the value itself.
What am I doing wrong?
Thanks!