I would create a query based on the table and use that as the export
source.
Put all the columns you need in the query and for the date field in
question,
rather than having that column name in the query, try this:
DateRemoved2: IIf(IsNull(DateRemoved),"",Format(DateRemoved,"Short Date"))
I don't know how the export will handle the "" value if the date field is
null - it may or may not work. Same goes for once the value is brought
into
Adobe. But the format statement should work to get the field written in
short
date format. If "" doesn't work you could try to specify " ", but again I
don't know what that would do once you're in Adobe.
Do you care what the field name is for the date field? If you need that
field
name to stay the same, the only way this would work would be to use a 2nd
query that simply uses the first query as it's data source and then use
this
for the date field in question in the 2nd query:
DateRemoved: DateRemoved2
Then use the 2nd query as the export source rather than the 1st query.
Access
doesn't allow you to create a new column that has the same name as the
original field it is referencing. Hope this helps.
Jennifer said:
Hi Jim,
If there is no value in the field, I want it to look like so:
<DateRemoved></DateRemoved>
The fields are date fields in Access. In access if there is no value in
the
field, it is left blank.
I want the dates in the XML file to be in a short format which is
compatible
with Access.
The data is being exported into an xml file, which is then imported into
an
Adobe form. The user will modify the data, send the form back, form data
is
exported to xml, the xml is then imported back into Access to update the
tables. This process is all automated using VBA.
Using this process, date fields that were originally blank in the tables
now
have the 1899 date in them after the updated data is imported.
Jen
I've never exported to XML, so I'm not sure if there's a way to tell it
what
[quoted text clipped - 32 lines]
Any idea why is it doing this? And how I can resolve it?