I'm trying to write a query for my Dataset's table adapter. It is
linked to an access 2003 database. Basically, I'm trying to duplicate
the following query.
SELECT Parts_Inventory.Aisle, Parts_Inventory.Rack,
Parts_Inventory.Shelf, Parts_Inventory.QNTY, Parts_Inventory.MFG_PN,
Parts_Inventory.Manufacturer, Parts_Inventory.Description
FROM Parts_Inventory
WHERE (((Parts_Inventory.Manufacturer) Like "*" & [?] & "*"));
I'm using a text box as my control to the manufacturer field. If it
is blank, it will show all my parts.
I'm able to get this too work, but I don't seem to be able to add wild
cards.
SELECT Aisle, Rack, Shelf, QNTY, MFG_PN, Manufacturer, Description
FROM Parts_Inventory
WHERE (Manufacturer = ?)
ORDER BY Aisle, Rack, Shelf, Manufacturer, MFG_PN
Is there anyone familiar with this?
|
|
0
|
|
|
|
Reply
|
mcolson
|
4/13/2010 2:49:46 PM |
|
On Apr 13, 9:49=A0am, mcolson <mcolson1...@gmail.com> wrote:
> I'm trying to write a query for my Dataset's table adapter. =A0It is
> linked to an access 2003 database. =A0Basically, I'm trying to duplicate
> the following query.
>
> SELECT Parts_Inventory.Aisle, Parts_Inventory.Rack,
> Parts_Inventory.Shelf, Parts_Inventory.QNTY, Parts_Inventory.MFG_PN,
> Parts_Inventory.Manufacturer, Parts_Inventory.Description
> FROM Parts_Inventory
> WHERE (((Parts_Inventory.Manufacturer) Like "*" & [?] & "*"));
>
> I'm using a text box as my control to the manufacturer field. =A0If it
> is blank, it will show all my parts.
>
> I'm able to get this too work, but I don't seem to be able to add wild
> cards.
> SELECT =A0 =A0 Aisle, Rack, Shelf, QNTY, MFG_PN, Manufacturer, Descriptio=
n
> FROM =A0 =A0 =A0 =A0 Parts_Inventory
> WHERE =A0 =A0 (Manufacturer =3D ?)
> ORDER BY Aisle, Rack, Shelf, Manufacturer, MFG_PN
>
> Is there anyone familiar with this?
I was using the wrong wild card.
WHERE (Manufacturer LIKE '%' & ? & '%')
|
|
0
|
|
|
|
Reply
|
mcolson
|
4/13/2010 3:03:40 PM
|
|
|
1 Replies
355 Views
(page loaded in 0.087 seconds)
|