Append Query??????

MadCat

Registered User.
Local time
Today, 14:00
Joined
Jun 24, 2003
Messages
62
Hi all

This hopefully is a simple question. I have a form that books courses. I'd like it so that i can have a button that can be clicked that will take the details from the current record and append them to the table, only it must add 14 days on to the date so the course is booked on a fortnightly basis.

Does anyone have any ideas on how to do this

Thanks in advance
 
Is this however done within an append query. would that work?

Thanks
 
Yes, just use this for the supplied data, in QBE it would look like:
fortnight: DATEADD("d",14,now())
 
Sorry to be a pain but i can't seem to get this.

What i've got is an append query which appends data to a "CourseInformationtbl" table. i have added all the fields to the query and set it so that the record that is to be appended is the same as the one on the "CourseInformationFM" by comparing the ID field. Under the date criteria i have a dateadd function to add 14 to the existing date. This doesn't seem to work and says that 0 rows have been appended.

I'm really not sure where i'm going wrong.

Thanks for your patience
 
Are you sure your query itself is functioning correctly? I'd try to run this first as a "normal" select query, make sure the query is pulling the correct records, then change this back to an update query and then run it.
 
Ok. When using the select query and taking out the date add field it selects the record i want to modify and displays it fine. its when i turn it to an append query and try without the date query i get an error message regarding a key violation so the record could not be added. Might this have something to do with the autonumber field? and if so how can i get round the fact that i use this to ensure the correct field i am getting. Hope this makes sense.

Thanks
 
I have the violation sorted. It was the autonumber field. i still have the problem with adding 14 to the date. i'm not sure where to add this. at present it is as a criteria in the date column on my query.

Is this correct sounding or way of the mark

Thanks
 
Not in the criteria, it should be a select column (very top box) see attachment
 

Attachments

  • example.jpg
    example.jpg
    41.3 KB · Views: 152
Thanks Mate


That worked now. I'll never do that again at least :)


Cheers
 

Users who are viewing this thread

Back
Top Bottom