TransferText Question

Joined
Oct 13, 2010
Messages
1
Reaction score
0
Hi,

I am trying to develop a macro or sub function that will utilize TransferText if data is present in a table. If there is no data in the table i.e. completely null; then TransferText does not process. So far I am having no luck and I dont know where to start. Is this even possible? Thanks!
 
maybe if you check the record count. something like this;
Code:
Sub sTransferStuff()
   Dim rstTheTable As Recordset
   Set rstTheTable = CurrentDB.OpenRecordset("tblTheTable", dbOpenDynaset)
   If rstTheTable.RecordCount > 0 Then ' so the table is empty of data
      '' do your DoCmd.TransferText stuff here
   End If

   rstTheTable.Close
   Set rstTheTable = Nothing
End Sub
That help?
 
Back
Top