Clear Data in Subform w/o deleting in table

J

Jon M.

I have a form with a subform in datasheet view. My form pulls up vendors, my
subform pulls up products from those vendors and order#'s. When a vendor
stops selling us a product I would like to be able to clear it from the
subform, but not delete the record so that I can go back and still be able to
refer to those past orders in the reports that are run showing completed
orders. As it works now if I try to clear(by which I mean delete because
that's all I know how to do) it deletes my info from the corresponding
tables. I have painted myself into a corner on this and would love some
advice, thanks.
 
D

Dirk Goldgar

Jon M. said:
I have a form with a subform in datasheet view. My form pulls up vendors,
my
subform pulls up products from those vendors and order#'s. When a vendor
stops selling us a product I would like to be able to clear it from the
subform, but not delete the record so that I can go back and still be able
to
refer to those past orders in the reports that are run showing completed
orders. As it works now if I try to clear(by which I mean delete because
that's all I know how to do) it deletes my info from the corresponding
tables. I have painted myself into a corner on this and would love some
advice, thanks.


I'm not sure what your data structure is, but normally this would be handled
by putting an Inactive flag (yes/no field) in one table or another. Then
your subform would be based on a query that excludes those records where
Inactive = True. What isn't clear to me is whether it's the vendor that
becomes inactive, or the vendor/product combination that becomes inactive,
or maybe even something else.
 
J

Jon M.

It's the product that becomes inactive. So Ace sells us Widgets, but then
one day they stop selling them to us, and now they sell cogs instead. On my
subform I see all the widgets, and now all the cogs too but all I want to see
is the cogs. But I don't want my widget records to be deleted. I'm going to
try and add a active/inactive field to my subform and filter out the
inactives like you suggested. Thanks.
 

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

Top