473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Form date field look up

I am creating a Form in Access 2000 to track request by month. However, we use an alternate calendar, so I need to check the Request Date to determine the New Month and Year. Here is the process flow:

Table1.Request_Date - updated on Form
AfterUpdate Select * From Table2 Where Table1.Request_Date => Table2.Start_Date and Table1.Request_Date <= Table2.End_Date

Should return Table2.Month and Table2.Year and those values go to Table1.New_Month and Table1.New_Year... Or an error if there are no matches.

I am stuck on how to code this in Access, so any help would be appreciated.
Thanks!
Nov 20 '08 #1
4 1455
FishVal
2,653 Expert 2GB
Hello.

Could you clariy what do you mean by "alternate calendar"?
Are there any rules as for determining month and year of a date in alternate calendar?
Does Table2 contain these rules?

And the last but not the least - posting table(s) metadata would be nice.
Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Regards,
Fish
Nov 20 '08 #2
The Alternate Calendar is basically built yearly and is used as a billing calendar. For example 12/06/08 - 01/02/09 would be considered Jan 09; 01/03/09 - 01/30/09 would be Feb 09; 01/31/09 - 03/06/09 would be Mar 09.

So, if we received a Request on 12/08/08, we would want to show it in the database table as New_Month = January; New_Year = 2009, and all of our reports would be based on those dates, and not the actual Request date.
Nov 20 '08 #3
FishVal
2,653 Expert 2GB
So in Table2 you have Start_Date, End_Date and, let us say, Billing_Date defining conversion rules.
You could use the following join:
Expand|Select|Wrap|Line Numbers
  1. Select Table1.*, Table2.Billing_Date From Table1 INNER JOIN Table2 ON Table1.Request_Date => Table2.Start_Date AND Table1.Request_Date <= Table2.End_Date;
  2.  
Regards,
Fish
Nov 20 '08 #4
That should work.. What code do I need to add to get the Table2.Billing_Date value into the Table1.New_Month field?
Nov 20 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
11
by: David Messner | last post by:
Ok I know this is simple but the statement eludes me... I have a date field where I want the default value on the data entry form's date field to be the last date entered. I figure I can do this...
1
by: Norbert Lieckfeldt | last post by:
MS Access 2002 here. I am just trying to set up a simple database for a friend who's an optician. Basically, all clients with address details, date of last eyetest and a drop-down combo box to...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
13
by: ricky.agrawal | last post by:
I'm really not sure how to go about this in Access. What I've created is a table for each location. Those tables are identical in format but different in information. The tables are named after...
10
by: RoadRunner | last post by:
Hi, I have a employee vacation database that has a vacation table that has the employee name, pay week and date of vacation. I have another lookup table with pay week code and date range for the...
3
by: cyber0ne | last post by:
I'm designing a basic form for data entry into one main table. There are two fields in the table that I would like to be automatically populated, not user-entered, when the record is posted. ...
11
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
2
by: jcf378 | last post by:
hi all. I have a form which contains a calculated control ("days") that outputs the # of days between two dates (DateDiff command between the fields and ). However, when I click "Filter by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.