Microsoft
Software
Hardware
Network
Question : Can I pass a text box variable into an Access Macro
Can I take a varible created by a text box from a form and input it into the TransferSpreadsheet file location in a Macro. Can I do that in VB is it cannot be done within the macro itself.
Example: Form Input:. User puts a file name in a text box. (this is the file he is nameing for a report). The text box is call fname.
Macro Test: TransferSpreadsheet:
Export
Excel 2003
Table name: RPT
File: C:\Reports\Forms!Input!fna
me (Is this part possible)
Thanks
Answer : Can I pass a text box variable into an Access Macro
Sure, but you will need to write a VBA macro. This is the syntax for the actual call:
DoCmd.TransferSpreadsheet acImport, 3, "myTable","C:\Reports\Form
s\Input\" & strFileName, True, "A1:G12"
Leon
Random Solutions
Employee Leave Management
Load into SQL Server From FoxPro database through SSIS
Microsoft Outlook 2003 hangs on start
MS Access Report Selection Options
Unable to remove printer driver for HP LaserJet 1300 PCL 5e
vbscript SQL Server 2005 calling SP
how to use if statements for Excel
Could not load file or assembly 'Microsoft.SharePoint.Sear<wbr />ch' or one of its dependencies
image in datalist
mySQL - Selecting data from either of two tables with identical schema