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
Exchange-Outlook Synchronization Log mssgs
WebService: Error adding reference or calling the service in browser
MDaemon not collecting Domainpop mail
Desktops running Great Plains Dynamics lose connectivity but can still browse network
SQL SERVER 2008 service not starting
SBS 2008: Cannot enable shadow clopies
Windows XP - Strange Connection Issues (ping but can't browse)
Access Query Too Complex Error with Union Query
How do you setup the Edge Transport Role in Exchange 2010 if you only have 1 server in the organization?
Simple (I think) but Urgent: Copy (XCopy?) files from multiple subdirectories into one directory