E
excelnut1954
I have a button on a worksheet that the user can click when he wants to
find a record within the list. A userform comes up, asking for a PO# .
I have the code run a simple Cell.Find with the worksheet (Current
List).
In a crude way, I have it go to each field of that record, and populate
all the textboxes in a second userform . Works fine. Very simple.
However, I would like to also use this userform in another worksheet
(Deleted List) that will contain these same records that are put there
when the material (PO) is taken from the warehouse (and off the Current
List).
For the purpose of this userform, the difference in the 2 worksheets
is that the Current List will not contain duplicate lines with the same
PO#, while the Deleted List will have many duplicates. (Many times,
material will come in at different times from the same PO. And, parts
of a PO will leave the warehouse before the rest will.)
What I would like to do is to put a Next Record button on the userform
that shows all the fields of the record. Clicking the button would have
the next record populate in all the textboxes, just as it did with the
1st record.
Also, maybe a textbox that would contain a Y if there is another
record to look at. The user could then click the Next Record button if
there was a Y in that box. Over and over looking at each of the records
with the same PO# , until the Y is not in the box.
OR,
I suppose a better, but I'm sure a more complicated method would be
to have the button shaded when there is no other record found, and
active when there is more.
Anybody have something I could use? I've been looking at a good
number of places, but haven't found any examples that resemble what
I'm trying to do.
Hope I've made this clear enough. Sometime I make it more complicated
than it is.....
Thanks
J.O.
find a record within the list. A userform comes up, asking for a PO# .
I have the code run a simple Cell.Find with the worksheet (Current
List).
In a crude way, I have it go to each field of that record, and populate
all the textboxes in a second userform . Works fine. Very simple.
However, I would like to also use this userform in another worksheet
(Deleted List) that will contain these same records that are put there
when the material (PO) is taken from the warehouse (and off the Current
List).
For the purpose of this userform, the difference in the 2 worksheets
is that the Current List will not contain duplicate lines with the same
PO#, while the Deleted List will have many duplicates. (Many times,
material will come in at different times from the same PO. And, parts
of a PO will leave the warehouse before the rest will.)
What I would like to do is to put a Next Record button on the userform
that shows all the fields of the record. Clicking the button would have
the next record populate in all the textboxes, just as it did with the
1st record.
Also, maybe a textbox that would contain a Y if there is another
record to look at. The user could then click the Next Record button if
there was a Y in that box. Over and over looking at each of the records
with the same PO# , until the Y is not in the box.
OR,
I suppose a better, but I'm sure a more complicated method would be
to have the button shaded when there is no other record found, and
active when there is more.
Anybody have something I could use? I've been looking at a good
number of places, but haven't found any examples that resemble what
I'm trying to do.
Hope I've made this clear enough. Sometime I make it more complicated
than it is.....
Thanks
J.O.