I am trying to simply export data from a table to a dbf file (actually excell or txt file would work too). The only contraints are that is must be automated, and include the date in the name of the output file.
I would also like to delete all the records in the file beinig exported - but will probably not do both at the same time.
I'm exasperated and can't seem to do these very simple tasks and keep getting errors.
I'm not even sure 'where' to put the code or how to 'run' it if I indeed need VBA code - in a function? Doesn't seem to work. I've made a Macro to run the function still get errors (all kinds depending on what syntax I use)
There is a help pop-up with the command when I type in a coma (in the transferDatabase) - but the same help will not come up in help either VB or MSAccess!
Here's my Function so far.
Function exportspr()
DoCmd.TransferDatabase acExport, "dbase IV", NV_Springs, acTable, NVSprings, "C:\NVSprings" & Date$ & ".dbf"
End Function
I would also like to delete all the records in the file beinig exported - but will probably not do both at the same time.
I'm exasperated and can't seem to do these very simple tasks and keep getting errors.
I'm not even sure 'where' to put the code or how to 'run' it if I indeed need VBA code - in a function? Doesn't seem to work. I've made a Macro to run the function still get errors (all kinds depending on what syntax I use)
There is a help pop-up with the command when I type in a coma (in the transferDatabase) - but the same help will not come up in help either VB or MSAccess!
Here's my Function so far.
Function exportspr()
DoCmd.TransferDatabase acExport, "dbase IV", NV_Springs, acTable, NVSprings, "C:\NVSprings" & Date$ & ".dbf"
End Function