Button on main form to delete record on subform

not_rich_yet

Registered User.
Local time
Today, 18:52
Joined
Mar 19, 2002
Messages
39
Can I do this? ie click a button on the main form to delete a record on a subform?

Ta,

nry
 
Presumably you may have several records in your subform and only want to delete one of them. First you need to identify the record to delete, maybe with a yes/no tick box. Then you can run a delete query on the sub form with the criteria set to the MainformID and the tickbox = Yes or write code to do the same job.

HTH
John
 
Not quite.....I have several subforms on my main form. Each subform represents a possible appointment and it's time for a given date. I have a button that allows me to set every appointment as a 'holiday' (to set staff holidays) but I also want a button that allows me to reset every appointment back to blank (incase of staff holiday date changes etc etc)....

I'd never thought of using a delete query for whatever reason, though it sounds the most logical way! I'll have a play...

Cheers,

nry
 

Users who are viewing this thread

Back
Top Bottom