Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA help please

Status
Not open for further replies.

bdjb

Technical User
Oct 29, 2002
292
US
I am using access xp, and the following code in a module:
Public Sub Get_Input()

Dim strMsg As String

strMsg = "Enter the Fiscal Year and Fiscal Month in the format YYMM"
strInput = InputBox(strMsg)

'Change the path below to the live path
strPath_AP = "C:\nfslawson\" & strInput & ".VAPGLTRANS.csv"

The portion ".VAPGLTRANS.csv" actually gives the output of "#VAPGLTRANS.csv" - any idea why or how to fix that?

Thanks

What happens if you get scared half to death twice?

Bob
 





Hi,

I cannot reproduce your error. The code works just fine.

Skip,

[glasses] [red][/red]
[tongue]
 
Hi Skip,
Sorry, I left off a chunk of the code, it's when the file export runs that I get the # instead of . in the file name

Option Compare Database
Public Sub Get_Input()

Dim strMsg As String

strMsg = "Enter the Fiscal Year and Fiscal Month in the format YYMM"
strInput = InputBox(strMsg)

'Change the path below to the live path
strPath_AP = "C:\nfslawson\" & strInput & ".VAPGLTRANS.csv"
strPath_AR = "C:\nfslawson\" & strInput & "_VARGLTRANS.csv"
strPath_IN = "C:\nfslawson\" & strInput & "_VINGLTRANS.csv"
strPath_PJ = "C:\nfslawson\" & strInput & "_VPJGLTRANS.csv"
strPath_SJ = "C:\nfslawson\" & strInput & "_VSJGLTRANS.csv"

DoCmd.TransferText acExportDelim, , "ExportFile_AP", strPath_AP
DoCmd.TransferText acExportDelim, , "ExportFile_AR", strPath_AR
DoCmd.TransferText acExportDelim, , "ExportFile_IN", strPath_IN
DoCmd.TransferText acExportDelim, , "ExportFile_PJ", strPath_PJ
DoCmd.TransferText acExportDelim, , "ExportFile_SJ", strPath_SJ

End Sub

What happens if you get scared half to death twice?

Bob
 




Did you want a [red]DOT[/red] or [red]UNDERLINE[/red]???
Code:
'Change the path below to the live path
strPath_AP = "C:\nfslawson\" & strInput & "[b][red].[/red][/b]VAPGLTRANS.csv"
'...

Skip,

[glasses] [red][/red]
[tongue]
 
I actually want a dot, the underlines were just testing to see if that worked correctly.

What happens if you get scared half to death twice?

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top