Try this
Private Sub Command4_Click()
DoCmd.TransferText acExportFixed, "VDU", "qryVDU", "C:\FHM\VDU.txt", No
DoCmd.CancelEvent
Dim strFilename As String
strFilename = InputBox("Enter VDU File Name:", "FHM")
If len(strfilename)>0 then
strFilename = "C:\FHM\" & strFilename
Dim...