Delete record from one table, set field in another table to no

A

Allison

Access 2003, Win XP

What is the best way to accomplish this? Would you please refer me to a
sample code if that's involved?

I'd like the user to press a button that:

1. Deletes the currently-displayed record (displayed in a form with a query
based off of tblDedInfo), and
2. Sets the "fldUsed" field in a different table (tblDedCodes) for a joined
related record.

Further info: The two tables are joined one-to-one on "fldDedCode" with
referential integrity enforced.

Thank you for any assistance you provide.

Allison
 
A

Allison

Does that mean it cannot be done as asked?

That field is used in a query elsewhere to auto-look up an available code.

Allison
 
C

Crystal (strive4peace)

Hi Allison,

What I was eluding to is that you should not be storing the calculated
field -- and as such, you would have no need to update it.

If you need to know this for a query elsewhere, it can be determined.
If you provide the SQL for the query that needs to know and the relevant
structure (key fields) for your tables, we can tell you how <smile>


Warm Regards,
Crystal
remote programming and training

http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page tutorial that covers essentials in Access

*
:) have an awesome day :)
*
 
A

Allison

Crystal - I did it that way because somebody else here (Klatuu) told me to as
the best way to accomplish my original goal. Here is a tiny url link to that
old thread from January 208: http://tinyurl.com/fldUsed.

So, how do I do both what I originally asked in the above link, AND what I
asked last week?

Allison
 
C

Crystal (strive4peace)

Hi Allison,

I read the other thread -- you already had the Available field so that
was not something suggested by Klatuu

So, I repeat my request to know the relevant datababase structure so
that we can help you with the equation you will need for the calculation.

by the way, What is DedID?

What kind of data are you tracking? Thank you

Warm Regards,
Crystal
remote programming and training

http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page tutorial that covers essentials in Access

*
:) have an awesome day :)
*
 

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