A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problems with loading forms



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2006, 04:30 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Problems with loading forms

Hi Everyone,

I am very new to this but so far have managed to create a small database
with a few tables linked together and a few queries.

I have also created some reports and forms.

Using the switch board I would like to open a form in edit mode, which has
been filtered by default
base on the following two conditions:
- Status = Open
- Trace date = Any date during this week. Basically I would like the date
range to change automatically depending on the current week. The current
week being Monday to Sunday.

What is the code and where do I enter it?

I am using Access 2000.

Many thanks

Anguel.


  #2  
Old April 26th, 2006, 09:35 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Problems with loading forms

one possibility

create a query to supply the data for the form you want to open.

In the status column add "OPEN" as the criteria
in the date field add the following as criteria

BETWEEN (DATE() - (Datepart("w",date(),2)-1) AND (DATE() -
((Datepart("w",date(),2)-1)+6)

explanation:
(Datepart("w",date(),2)-1)
The 2 is saying use Monday as first of week.
basically this is trying to compute the number of days to subtract from
today to get is the first of the week. (If this is not quite right you
will need to play with it to get it to do that.)

(DATE() - ((Datepart("w",date(),2)-1)+6)
This is the same calculation but it then is adding 6 to it to compute
the end of the week. (If you change the first part then change this one
to be identical.

Ron

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
printing only forms Kagiso General Discussion 1 December 14th, 2005 04:32 PM
Duplex problems when using vbscript forms in Word Rob Kell General Discussions 9 November 28th, 2005 01:58 PM
Problems with saving and loading data and events STM General Discussion 0 September 26th, 2005 01:28 PM
File Corruption problems Frustrated Page Layout 2 December 3rd, 2004 09:47 PM
Forms and Subforms Problems DEvans Using Forms 1 October 7th, 2004 05:13 PM


All times are GMT +1. The time now is 07:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.