append/delete queries

rvd48

Registered User.
Local time
Today, 14:08
Joined
Feb 2, 2004
Messages
123
i am creating append/delete queries but am having a little trouble making them work.
basically, when any date is entered into a date field in my main form i want that record to append to a new table and delete.
now, im not sure what to put into the query criteria?

[i assume it will be the same bit of code for the 'delete' query]
 
Suggest that you use the Search button on this one. Try having a look first. There is heaps of information on Action Queries here.

Hope this helps. :)
 
Lister said:
Suggest that you use the Search button on this one. Try having a look first. There is heaps of information on Action Queries here.

Hope this helps. :)

thanks for the advise, i've looked through the search results and carnt find anything which is relevant.
 
I think we need to know a little more. Your first post mentioned entering a date, adding it to a table and the deleting it.

This does not actually give much away

len B
 
Len Boorman said:
I think we need to know a little more. Your first post mentioned entering a date, adding it to a table and the deleting it.

This does not actually give much away

len B


sorry about that len.

basically when a car is sold, the date of sale is put into a field in my main 'AllCars' form, now when that date is in-putted i would that record to archive into another sheet.
 
Okay so basically you bring up the car details and enter date sold.

Then you need an append query
This appends all records to the archive table where sold date is not null.

Then a delete query that deletes records from the "for sale" table where the sold date is not null


You could fire these two queries one after another from the "On Close" property of the form you use to add the sold date but you must make sure that the record is saved first.

Depends on how your interface is set up. I would normally have a button on a main form that then displayed a combo box of cars for sale. I would have the button run the queries first and then open the combo.

On the same form I would have another button to View sold details. Again similar procedure.

This way whichever option you took the queries would fire and you would always get accurate records.

Could be considered a bit of an overkill but would ensure accuracy

HTH

len
 

Users who are viewing this thread

Back
Top Bottom