mutiple -query

F

Fuzuy

I have a look-up Table which has been grouped by part numbers and
looks like in the following:


ParNumber Range1 Range2
x-xx-x-00001 to x-xx-x-00050 Or x-xx-x-0001 to x-xx-x-0050 1 50
x-xx-x-00051 to x-xx-x-00100 Or x-xx-x-0051 to x-xx-x-0100 51 100
x-xx-x-00101 to x-xx-x-00150 Or x-xx-x-0101 to x-xx-x-0150 101 150
x-xx-x-00151 to x-xx-x-00200 Or x-xx-x-0151 to x-xx-x-0200 151 200
x-xx-x-00201 to x-xx-x-00250 Or x-xx-x-0201 to x-xx-x-0250 201 250
which was used as a combo7 row source

Combo7 is resided in a form (frmcombo) which has two text boexs
contain each corresponding combo box value--Range1 & range2.

me.text5=me.combo7.colum(1) for range1
me.text10=me.combo7.colum(2) for range2

Also in frmcombo has another combo box to get a specific product for
code product mid(parnumber,3,2)

( I have also reenforced previous assignement at after update event
for combo7 and current event on the form)

these two text values were used as criteria to filter parts listing
for another form (frmlist) of a list box;
the row source of list box was a Table which has part_number

which looks like in the following, it has 2000 more items:
.....
x-cc-t-00001
x-cc-t-00012
x-cc-t-00023
x-cc-t-00028
x-cc-t-00030
x-bb-t-00101
x-bb-t-00121
x-bb-t-00031
x-cc-x-0005
x-cc-x-0080
x-cc-x-0020
x-cc-x-0111
x-cc-x-0135
x-dd-x-0156
.....
I want to get a list of partnumber whenever range 1 & range 2 values
were referenced in frmcombo,
say if range1= 1 and range2= 50 I would like to get a list of look
like:

x-cc-t-00001
x-cc-t-00012
x-cc-t-00023
x-cc-t-00028
x-cc-t-0003
x-cc-x-0005
x-cc-x-0020

however, at present time I only be able to get:
x-cc-t-00001
x-cc-t-00012
x-cc-t-00023
x-cc-t-00028
x-cc-t-00030
x-cc-x-0005
x-cc-x-0080
x-cc-x-0020
x-cc-x-0111
x-cc-x-0135
I found out me.text5 and me.text10 values was not passing via [Forms]!
[frmcombo]![text5] and [Forms]![frmcombo]![text10]

Is any restriction on numbers of textbox be referenced? or any good
suggestions how to do further query ? Thanks in advance for help!
 
M

M.

I think it may be useful to tackle this problem in the table by redefining it
like this

Old table
field1 (x-xx-x-00001)

New table
field1 (x) text(1)
field2 (xx) text(2)
field3 (x) text(1)
field4 (00001) integer
fivedigit (yes/no) boolean

Advantages here are that you are more flexible in accessing your substrings
in your part numbers, e.g. the ranges can be selected in a query based on
field4.
The fivedigit field can be used to define the display format in forms and
reports (either 0000 or 00000).

Hope this helps,

M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top