Ok I´ve converted a mdb-file from 2002-to 2000-format and the following problem keeps occurring with a sub-procedure that is supposed to hand over a report to Word.

Private Sub report2word(reportname As String)

Dim filepath As String
Dim wordpath As String
Dim command As String

filepath = "C:\temp\report_test.rtf"

DoCmd.OutputTo acOutputReport, reportname, acFormatRTF, filepath

wordpath = "C:\Programs\Microsoft Office\Office10\winword.exe "

command = wordpath & Chr(34) & filepath & Chr(34)
Call Shell(command, vbMaximizedFocus)

DoCmd.Close acReport, reportname

End Sub
The problem is that the file in 2000-format run in Access 2000 fails to save the rtf-file according to the path given. The directory in question is not write-protected and only the saving seems to be a problem, everything else works. (btw it works beautifully in Access 2002). What might be wrong?

Ok, I have a second problem, please bear with me for one more second. In order to make the entry of addresses more user-friendly I am trying to pull out the name of the location and the county according to the postcode just entered (afterupdate) from a table (tbl_postcodes) and fill them into their respective fields on the form *but only in case these fields are empty* (to make sure a previous entry is not automatically overwritten).

This is what I came up with:

Private Sub postcode_AfterUpdate()
'tbl_postcodes contains a full directory of all the postcodes and locations in my country (Germany)

If trim(Me!location) = "" Then
Me!location = DLookup("location", "tbl_postcodes", "postcode=" & Me!postcode)
End If

If trim(Me!county) = "" Then
Me!county = DLookup("county", "tbl_postcodes", "postcode=" & Me!postcode)
End If
End Sub
the above procedure works like a dream without the if-clauses, but fails to work with them. I have tried it with IsNull(), IsEmpty() and without the trim()-function, but it doesn´t work. When trying to debug, I only learn that the fields location and county are not empty, do not equal null etc. but they do not contain any visible characters on the form. I am completely clueless here, does anyone have a hint?

Thank you in advance for helpful suggestions!