Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB or SQL for incrementing dates by wks and turn of yes/no...

Status
Not open for further replies.

freespiritcherishes

Technical User
Oct 17, 2003
42
GB
I have a query with DateAdd("d",7,#07/11/04#) under Due Date in a query. I want to add 7 days from this date so that if i look at my query in datasheet view I can see all the Sundays from today till the end of time. I don't want to use DateAdd("d",7,Date()) as the date changes to the current date. The problem is that because the date is fixed it will always only show the 14th November and I want it to show the 21st Nov, 28th Nov, 5 Dec, 12 Dec and so on. I want six tabs on a form labelled Sunday to Saturday, each with an underlying query filtering the dates by way of all the sundays under the Sunday tab, all the monday dates under the monday tab and so on as time passes. Can this be done?

Also, does anybody no of a way to disable the prompt when running an append query or program it to just say yes all the time?

freespirit
 
I don't know if its of any help, but if you look around page 3 of the current forum, and look for "unusual combo" the info may be of interest? Also the append notice boxes, are you running from a macro or code. The SetWarnings bit could be what you want. I think its in the macro parts to set True or False. In code I have been using DoCmd.SetWarnings (False) to stop messages and DoCmd.SetWarnings (True) to turn tham on again.
 
Thanks Zor, I shall go and look. Yes, im sorted with .setwarning. Thank you.
freespirit
 
Take a look at the result of Format([Due Date], "w")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top