J
Jim Jones
Some help needed for a novice
In my program I first input values for string variables Inputfile and
Varyear, as follows:
Dim Inputfile As String, Varyear As String
Inputfile = InputBox("Name of file to be input")
Varyear = InputBox("Year eg 08")
I then use the value of Inputfile to identify the text file from which I
import the data:
DoCmd.TransferText acImportFixed, "IMPORT CANDIDATE DETAILS", "Temp", _
"C:\Documents and Settings\jjones\Desktop\Development\" & Inputfile &
".TXT", False, ""
So far, so good
But then I want to use the second variable Varyear as part of an SQL
statement such as
DoCmd.RunSQL "UPDATE Temp SET Temp.[Year] = Varyear", -1
This does not work. So, how do I represent Varyear in a statement like this
Any help would be much appreciated.
Jim Jones
In my program I first input values for string variables Inputfile and
Varyear, as follows:
Dim Inputfile As String, Varyear As String
Inputfile = InputBox("Name of file to be input")
Varyear = InputBox("Year eg 08")
I then use the value of Inputfile to identify the text file from which I
import the data:
DoCmd.TransferText acImportFixed, "IMPORT CANDIDATE DETAILS", "Temp", _
"C:\Documents and Settings\jjones\Desktop\Development\" & Inputfile &
".TXT", False, ""
So far, so good
But then I want to use the second variable Varyear as part of an SQL
statement such as
DoCmd.RunSQL "UPDATE Temp SET Temp.[Year] = Varyear", -1
This does not work. So, how do I represent Varyear in a statement like this
Any help would be much appreciated.
Jim Jones