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!
 
Joined
Mar 15, 2011
Messages
19
Reaction score
0
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top