transfer spreadsheet

Marrick

New member
Local time
Today, 22:49
Joined
Mar 12, 2002
Messages
9
I would be very grateful for some help
The following code actually works,it prompts
the user of an Access runtime App to enter the path to an XL workbook
Function mcrtoKo
On Error Resume Next
Dim REF As String
REF = InputBox("Enter full path")
DoCmd.TransferSpreadsheet _ acExport, , "qrylosersForPlate", REF, _ False, ""
End Function
However,having to do this each time is cumbersome,depending on the length of the client computer file path,so I tried to make
'REF'reference a control on a form that
allows the user to enter the path into a table once only on setup eg:
REF=forms!refsubFrm!txtControl.Value
No Joy!
Thanks in advance for any help
MARRICK
 
I'm not sure exactly what problem you are having with the "REF=forms!refsubFrm!txtControl.Value" line, but is the form 'refsubFrm' open when you try to read the value of the control?

Have you considered storing the REF as a Global variable? Store the text control value to REF at an appropriate event (e.g. closure of the 'setup' form and then it'll be available when you want it.)

Hope That Helps.
 

Users who are viewing this thread

Back
Top Bottom