Here comes my second post. My database for C&G Vending has already been sent to you.
You will see that I have a frmSodaCatalogue, tied to tblSoda. In addition there are
four "satellite" forms, each with its own separate table, that I use to enter
inventory data for different parts of the vending operations. However, the
data in the four satellite tables is added automatically from the master
tblSoda in frmSodaCatalogue.
No problems adding new records from tblSoda to the four satellite
tables--tblSodaTallyNorthM, tblSodaTallySouthM, etc.
The problem comes when I want to DELETE a record in tblSoda
and have it reflected in the four satellites. I gave up on trying to
set relationships for the five tables in Access. For one thing,
there's more than one operation I need to do with each potential
deletion, and they may not always be the same. So it seems more
reasonable to deal with each situation in code.
The only thing holding that up is that I can't get the focus to
move from the target record in frmSodaCatalogue to the
corresponding records in the satellites. I've read about various
functions or methods that supposedly do this: SQL statement,
Find, Seek, DLookup, etc. Problem is that it seems that none of
these will accept a value stored in a variable. Instead the user
always has to take some action: type a name into a box, click
on an item in a list box, etc. I don't my users to have to do that.
Let's say the current ItemName in tblSoda is "Brisk." That field
is the PrimaryIndex. I store that value in variable ItemNameRec.
So far so good. But I can't get any of those critters named above
to accept it as meaning "Brisk." They just ignore it, or crash.
Which, if any, of those things above seems best for my purposes?
I would take a guess at Seek, if I just get it to recognize that
ItemNameRec is to be interpreted as "Brisk."
P.S. How do I give praise to you guys for your help? Just
choose one of the icons? Wouldn't words be better?