navigate, find, and delete records.

hjeff71

Registered User.
Local time
Yesterday, 23:12
Joined
Apr 23, 2009
Messages
13
I have a form (datasheet view), with Project Number and Child Number

Each project can have childs (ie: Project 1001 can have 1001-1, 1001-2, 1001-3 etc)

I’d like to learn how to navigate through the data of the table and have the option to delete the record if:

- The project # or the child is the last one in the series.

1001
1002

1003 – Can be deleted because it is the last one

OR

1001
1001-1
1001-2
1001-3 – Can be deleted because it is the last one
1002 – Can NOT be deleted because there is a 1003
1003 – Can be deleted

View attached test.mdb for example.
 

Attachments

Use the form_current event and set the form's allowdeletions property depending on conditions in the current record.

e.g.

Code:
    Me.AllowDeletions = Mid(Nz(text1), 3, 1) = "d"
 

Users who are viewing this thread

Back
Top Bottom