promotetemp: a string that is chosen from a drop down to choose what
table to get to.
criteria: a string that has a list of upcs to search for in the table
chosen. format: ('__','__',etc)
Me.frmPromote.Form.RecordSource = "SELECT UPCCase, UPCItem, SVDCName,
SVItemCd, SVBrand, SVDescription, SVPack, SVSize, SVStatus, WeekFcst,
VendorPkCost, SVSell FROM z" & promotetemp & " WHERE UPCCase IN " &
criteria & ";"
Me.frmPromote.Form.RecordSource = "SELECT UPCCase, UPCItem, SVDCName,
SVItemCd, SVBrand, SVDescription, SVPack, SVSize, SVStatus, WeekFcst,
VendorPkCost, SVSell FROM [z" & promotetemp & "] WHERE UPCCase IN " &
criteria & ";"
Otherwise, try putting the string into a variable and printing the variable
to the Immediate window (Ctrl-G). Does the SQL look correct? Does it run
when you copy it into a query?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Brandon Johnson" <xtant...@gmail.com> wrote in message
news:1153172154.0...@h48g2000cwc.googlegroups.com...
everything looks correct to me.(that z is suppose to be there btw, its
how i named all my tables for ease). Does anyhting stand out to you?
On the other hand, it looks as though you might have separate tables for
each product. That's a mistake: you should have a single table, with an
additional field to identify the product.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Brandon Johnson" <xtant...@gmail.com> wrote in message
news:1153173026.6...@b28g2000cwb.googlegroups.com...