A Way to automatically delete records

G

Guest

RG. thanks fo rthe info on the readers.
What is the address for the newsgroups? Thanks,
Dominic
"
 
R

RuralGuy

RG. thanks fo rthe info on the readers.
What is the address for the newsgroups? Thanks,
Dominic
"

The server is:
msnews.microsoft.com

And the forum we are in is:
microsoft.public.access.modulesdaovba
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
R

RuralGuy

Dominic: See in line

WHERE ((([Barbuda Passenger List].Date) = DateAdd("d",3,Date()))) AND
((([Barbuda Passenger List].Confirmed)=No))

The = said *only* those that are 3 days from scheduled departure.
Not 1 or 2 but exactly 3.

Understood. I have changed it to now read LESS THAN 4 as follows, and it now
works...does not show 4 days away, but does show 1 to 3:
SELECT [Barbuda Passenger List].ID, [Barbuda Passenger List].Date, [Barbuda
Passenger List].Flight, [Barbuda Passenger List].Name, [Barbuda Passenger
List].Pax, [Barbuda Passenger List].Confirmed, [Barbuda Passenger
List].[Contact Information], [Barbuda Passenger List].Notes
FROM [Barbuda Passenger List]
WHERE ((([Barbuda Passenger List].Date)<=DateAdd("d",4,Date())) AND
(([Barbuda Passenger List].Confirmed)=No))
I believe you should do a hard copy of all the deletions and keep it until after
the flight. You don't need an angry flyer at your counter without a reservation
they thought they had and no documentation to back up what happened.

I agree. Would it be possible for the form to run automatically, print, then
delete? That way we have a record of the records that have been
deleted.....run the report, then run another query (the same but with a
delete instruction).

Everything could be automatic except putting paper in the printer. :)
The only reason for deletion of a record is for NON confirmation within the
required time period. If we need to change a record, I have another query
with date, flight and name criteria where all info can be edited or deleted
for any other reason.

My point was that once the record is deleted the information is no longer
available so your other form is useless. This brings up some questions. Do you
now delete records *after* the flight has departed? Or do you keep them for
historical reasons? It is possible to make the system work differenty within
three days of departure without deleting the records. Would that be preferable
to deleting the records? Great time to ask right?
I think that the best solution is to limit ALL reservations to 19. That way,
the passengers are listed up until the cut off time. Then they are deleted
because of non confirmation. AFTER that, we could then take more CONFIRMED
ONLY reservations to make up the 19. We don't want to have ppl call up and
have their seats given away BEFORE the cut off time just because they paid
late.

As I said above, within three days of departure the system could *only* look at
confirmed reservations without deleting any records.
Now, i guess i run a report based on the that query, correct?

Yes, work of the report Then we'll tackle the deletes and automation.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
G

Guest

RG. See below

RuralGuy said:
My point was that once the record is deleted the information is no longer
available so your other form is useless. This brings up some questions. Do you
now delete records *after* the flight has departed? Or do you keep them for
historical reasons? It is possible to make the system work differenty within
three days of departure without deleting the records. Would that be preferable
to deleting the records? Great time to ask right?

What I meant, was run the report from the query, then print, then delete.
The records are kept for 6 months. We can do a query to get the records,
print them up, delete the records and then put the print outs into storage.
I don't think that looking for the ONLY confirmed records is really an
option if we are going to limit the number of reservations to 19. Because
then the NON confirmed ppl will be taking up / limiting the available seats,
and I will get in trouble for that! hahaha

As I said above, within three days of departure the system could *only* look at
confirmed reservations without deleting any records.

see above

Yes, work of the report Then we'll tackle the deletes and automation.

I have done up the report based on the working query and it works fine. ONLY
the records for the next 3 days will be pulled up. And when it is run on a
daily basis (or always open), we will not be able to put in any others that
are not confirmed (for thenext 3 days). Also, NON confirmed for tomorrow (for
instance) will not show up, as it would have been removed 2 days ago (if you
get my drift).

The deletion part next? Then limiting to 19(?), then we're done?....he says
hopefully!

As usual, thanks.

Dominic

BTW: using outlook express, but can't reply using it....Still have to use
the browser to do that. OE needs mail server, etc. Do I use my normal address
for it? Or my passport info?
 
R

RuralGuy

I hope you are working on a copy of the real db. In theory all you do is
replace the SELECT clause with DELETE * in your query to create the DELETE
query.

SELECT [Barbuda Passenger List].ID, [Barbuda Passenger List].Date, [Barbuda
Passenger List].Flight, [Barbuda Passenger List].Name, [Barbuda Passenger
List].Pax, [Barbuda Passenger List].Confirmed, [Barbuda Passenger
List].[Contact Information], [Barbuda Passenger List].Notes
FROM [Barbuda Passenger List]
WHERE ((([Barbuda Passenger List].Date)<=DateAdd("d",4,Date())) AND
(([Barbuda Passenger List].Confirmed)=No))

Becomes:

DELETE * FROM [Barbuda Passenger List]
WHERE ((([Barbuda Passenger List].Date)<=DateAdd("d",4,Date())) AND
(([Barbuda Passenger List].Confirmed)=No))

Warning!! Once they are gone there is *no* undo!! They're gone forever!!

RG. See below



What I meant, was run the report from the query, then print, then delete.
The records are kept for 6 months. We can do a query to get the records,
print them up, delete the records and then put the print outs into storage.
I don't think that looking for the ONLY confirmed records is really an
option if we are going to limit the number of reservations to 19. Because
then the NON confirmed ppl will be taking up / limiting the available seats,
and I will get in trouble for that! hahaha



see above



I have done up the report based on the working query and it works fine. ONLY
the records for the next 3 days will be pulled up. And when it is run on a
daily basis (or always open), we will not be able to put in any others that
are not confirmed (for thenext 3 days). Also, NON confirmed for tomorrow (for
instance) will not show up, as it would have been removed 2 days ago (if you
get my drift).

The deletion part next? Then limiting to 19(?), then we're done?....he says
hopefully!

As usual, thanks.

Dominic

BTW: using outlook express, but can't reply using it....Still have to use
the browser to do that. OE needs mail server, etc. Do I use my normal address
for it? Or my passport info?
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

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