G
Guest
I'm importing files into Access from JD Edwards using a Showcase query.
I've had success in getting most of the data cleaned up by using trim in my
VBA code, however, I still have additional criteria to meet.
#1) In addition to importing the records with storenum 700 through 6900, I
only need the records with specific RegDesc(riptions). I tried using <>
Closed/Sold/To Be Opened AND <> " ." spaces with a period.
I also tried to use = South Region, North Region, Main Region ....
What is the syntext required to use multiple criteria in VBA for Access. I
keep getting error messages when I try to add additional criteria to the code
below:
DoCmd.RunSQL "INSERT INTO tblStoreList ( costcenter, storenum, Div,
RegDesc, AreaDesc, DivisionDesc, STATEDESC, storename, divsht )" _
& "SELECT trim(tblStoreList2.costcenter), trim(tblStoreList2.storenum),
trim(tblStoreList2.Div), trim(tblStoreList2.RegDesc),
trim(tblStoreList2.AreaDesc)," _
& "trim(tblStoreList2.DivisionDesc), trim(tblStoreList2.STATEDESC),
trim(tblStoreList2.storename), trim(tblStoreList2.divsht)" _
& " FROM tblStoreList2 WHERE storenum > 700 and storenum < 6901;"
I've had success in getting most of the data cleaned up by using trim in my
VBA code, however, I still have additional criteria to meet.
#1) In addition to importing the records with storenum 700 through 6900, I
only need the records with specific RegDesc(riptions). I tried using <>
Closed/Sold/To Be Opened AND <> " ." spaces with a period.
I also tried to use = South Region, North Region, Main Region ....
What is the syntext required to use multiple criteria in VBA for Access. I
keep getting error messages when I try to add additional criteria to the code
below:
DoCmd.RunSQL "INSERT INTO tblStoreList ( costcenter, storenum, Div,
RegDesc, AreaDesc, DivisionDesc, STATEDESC, storename, divsht )" _
& "SELECT trim(tblStoreList2.costcenter), trim(tblStoreList2.storenum),
trim(tblStoreList2.Div), trim(tblStoreList2.RegDesc),
trim(tblStoreList2.AreaDesc)," _
& "trim(tblStoreList2.DivisionDesc), trim(tblStoreList2.STATEDESC),
trim(tblStoreList2.storename), trim(tblStoreList2.divsht)" _
& " FROM tblStoreList2 WHERE storenum > 700 and storenum < 6901;"