Link to home
Start Free TrialLog in
Avatar of mijwil
mijwil

asked on

Wildcard entries

I am trying to filter a field "IMA_ItemID"

The Item ID in this field are formatted as follows:

1200-####
1400-####
2600-####

etc.

I'm looking to have check boxes that will include all items selected. I need a wildcard statement which I do not know the syntax for. e.g. "1200*" ; "1400*"

The exact form name is "13frmInventory"

Thanks
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Is the ItemID a number field or a text field?
Avatar of mijwil
mijwil

ASKER

It is a text field
Do you really mean checkboxes?  It seems that a listbox or datasheet subform would be more appropriate for displaying the filtered items.  For filtering by the first 4 characters, something like this query would work:

User generated image
Avatar of mijwil

ASKER

Yes I want to use check boxes, radial buttons or something of that nature. I am trying to do this in VBA.

I'm looking to piece together a filter. This form is for inventory value and I have 3000 different items in it. They are categorized in 10 different categories. Lets say I want to analyze how much $$ inventory I have in the 1200 and 1400 categories. I can check off those 2 and see the sum figure at the bottom of my form. I may want to analyze 3 or 4 categories together. I'm looking for something like this:

Dim Item1200 as string
Item1200 = [IMA_ItemID] Like 1200* (this is the line I don't know how to write)

IF Checkbox2 = -1 then
Me.Filter = Me.Filter & " And " & Item1200

etc.....

I think I can figure out all the combinations, I just don't know how to write the line for a wildcard.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mijwil

ASKER

PERFECT! Thanks for your help. Worked first try.