i changed up the code abit to correct that.
Code:
Private Sub btnrunoutput_Click()
'check for empty comboboxes
If IsNull(Me.cboTablesList) Then
MsgBox "Please select a table"
Exit Sub
Else
If IsNull(Me.txtgetfile) Then
MsgBox "Please select a file"
Exit Sub
End If
End If
Dim strPath As String
Dim strSpec As String
Dim strTbl As String
strTbl = Me.cboTablesList
trPath = Me.txtgetfile
DoCmd.TransferText acImportFixed, , strTbl, strPath, True
' A message box indicating the process has completed.
'MsgBox ("The file has completed its transfer")
End Sub
It says i need a specification. what would i put for that, this part confuses me. I want to add this in
Code:
Private Sub btnrunoutput_Click()
'check for empty comboboxes
If IsNull(Me.cboTablesList) Then
MsgBox "Please select a table"
Exit Sub
Else
If IsNull(Me.txtgetfile) Then
MsgBox "Please select a file"
Exit Sub
End If
End If
Dim strPath As String
Dim strSpec As String
Dim strTbl As String
strTbl = Me.cboTablesList
trPath = Me.txtgetfile
strSpec = "what do i put here?"
DoCmd.TransferText acImportFixed, strSpec, strTbl, strPath, True
' A message box indicating the process has completed.
'MsgBox ("The file has completed its transfer")
End Sub
What would i set the string equal too? can some one explain this to me the idea of specifications etc? the offic site doesnt clarify it well for me, thanks in advance