ChiTownDiva
Technical User
Happy Monday All...
I have a question...
I want to import some data using an import spec (no problem), but sometimes the data will have one extra column that would need to be excluded depending on the customer (no problem there either--I have an extra import spec to take care of that). What I want to do is write some code to select the appropriate import spec depending upon the number of columns there are in the txt file. I know I need to use an If statement and/or Select Case, but I have no clue how to use the two together.
Here's what I have so far:
Function GetValue()
DoCmd.TransferText acImportFixed, "VALUE Import Specification", "VALUE", "C:\Documents and Settings\My Documents\Linkage\" & Forms![frmFilePath]![txtChannel] & "\" & Forms![frmFilePath]![txtStore] & "\Imports\VALUE.txt", False, ""
End Function
Is there a way to do that?
Thanks in advance
ChiTownDiva![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)
I have a question...
I want to import some data using an import spec (no problem), but sometimes the data will have one extra column that would need to be excluded depending on the customer (no problem there either--I have an extra import spec to take care of that). What I want to do is write some code to select the appropriate import spec depending upon the number of columns there are in the txt file. I know I need to use an If statement and/or Select Case, but I have no clue how to use the two together.
Here's what I have so far:
Function GetValue()
DoCmd.TransferText acImportFixed, "VALUE Import Specification", "VALUE", "C:\Documents and Settings\My Documents\Linkage\" & Forms![frmFilePath]![txtChannel] & "\" & Forms![frmFilePath]![txtStore] & "\Imports\VALUE.txt", False, ""
End Function
Is there a way to do that?
Thanks in advance
ChiTownDiva
![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)