J
Jonas
The portion of the project I am working on now is to create a table
based on criteria in another table. Below is the code that I have
produced so far. I am having trouble with naming the the new table
created via the make-table query. I would like the table to be named
abc1_abc2_abc3 where abc1 is equal to the variable in abc1, abc2 is
equal to the variable in abc2 and abc3 is equal to the variable in
abc3. In addition, I would like for access to automatically push enter
when prompted with the question: do you want to paste some number of
records into a new table after the make-table query has been run. I
have heard about sendkeys but I don't know how I could time it just
right so that the SendKeys command executed right after being promted
by access.
Suggestions are appreciated.
abc1 = myRecordSet.Fields(0).Value
abc2 = myRecordSet.Fields(1).Value
abc3 = myRecordSet.Fields(2).Value
MsgBox abc1
MsgBox abc2
MsgBox abc3
Dim StrSQL2 As String
MsgBox abc2
StrSQL2 = "SELECT NumericFile.Field1, NumericFile.Field2,
NumericFile.Field3, NumericFile.Field4, NumericFile.Field5 "
StrSQL2 = StrSQL2 + "INTO "
StrSQL2 = StrSQL2 + "'" & abc1 & "'"
StrSQL2 = StrSQL2 + "FROM NumericFile "
StrSQL2 = StrSQL2 + "WHERE (((NumericFile.Field2)='" & abc1_abc2_abc3 &
"') AND ((NumericFile.Field3)='" & abc2 & "') AND
((NumericFile.Field4)='" & abc3 & "'))"
DoCmd.RunSQL StrSQL2
End Sub
based on criteria in another table. Below is the code that I have
produced so far. I am having trouble with naming the the new table
created via the make-table query. I would like the table to be named
abc1_abc2_abc3 where abc1 is equal to the variable in abc1, abc2 is
equal to the variable in abc2 and abc3 is equal to the variable in
abc3. In addition, I would like for access to automatically push enter
when prompted with the question: do you want to paste some number of
records into a new table after the make-table query has been run. I
have heard about sendkeys but I don't know how I could time it just
right so that the SendKeys command executed right after being promted
by access.
Suggestions are appreciated.
abc1 = myRecordSet.Fields(0).Value
abc2 = myRecordSet.Fields(1).Value
abc3 = myRecordSet.Fields(2).Value
MsgBox abc1
MsgBox abc2
MsgBox abc3
Dim StrSQL2 As String
MsgBox abc2
StrSQL2 = "SELECT NumericFile.Field1, NumericFile.Field2,
NumericFile.Field3, NumericFile.Field4, NumericFile.Field5 "
StrSQL2 = StrSQL2 + "INTO "
StrSQL2 = StrSQL2 + "'" & abc1 & "'"
StrSQL2 = StrSQL2 + "FROM NumericFile "
StrSQL2 = StrSQL2 + "WHERE (((NumericFile.Field2)='" & abc1_abc2_abc3 &
"') AND ((NumericFile.Field3)='" & abc2 & "') AND
((NumericFile.Field4)='" & abc3 & "'))"
DoCmd.RunSQL StrSQL2
End Sub