Mileage Rate Change TB Or Qry

  • Thread starter BEES via AccessMonster.com
  • Start date
B

BEES via AccessMonster.com

I need HELP, I am trying to solve this but No Luck
I am trying to calculate IRS Mileage Rate which Changes 2 to 3 times a year.
I am a newbie using Access 03 And Finally finishing This database.
Now I am stuck with Mileage Rate Tb.

I Have a Visit Form based On Visit Table which is related with other tables.

Visit Form Is Continuous Form with Following Fields


Visit ID Textbox
Visit Date Textbox
FieldVisit Type Combo Box
Clint ID Combo Box
OfficeVisit ID Combo Box
ClinicVisit ID Combo Box
Time In Textbox
Time Out Textbox
Total Time Textbox
Odo Meter Start Textbox
Odo Meter End Textbox
Total Mileage Textbox = [EOdo] - [SOdo ] (Field Is
not in Table )
Meter Toll Paid Textbox
Paid Un Paid Check Box


I Just Added A New Table- IRS Mileage Rate Tb.
Mileage Rate Form is also Continuous Form
Fields Are:

Rate ID Textbox
Effected Date Textbox
Active Rate Check Box
Year (=Effect Date) Format yyyy.

I would like to relate the Visit date In Visit Tb with Effected Date in IRS
Mileage Tb
I have about 600 records In Visit Table.
I Have a Query that gives me total mileage Monthly and Yearly.
I have tried to pull IRS mileage table into the total mileage query but no
luck.
I need to know if my table structure is correct, obviously I am missing
something, I need to know where I am going wrong.

Any help is appreciated!!
 
B

BEES via AccessMonster.com

boblarson said:
Perhaps this sample of mine would be useful:
http://downloads.btabdevelopment.com/Samples/misc/Sample-MileageRate.zip
I need HELP, I am trying to solve this but No Luck
I am trying to calculate IRS Mileage Rate which Changes 2 to 3 times a year.
[quoted text clipped - 40 lines]
Any help is appreciated!!


Thanks for your quick respond.
I got some idea from your sample DB
I am trying to Put D-Look In my total Mileage Qry which is quite complicated .

I will let you know how its goes
Thanks Again for your help.
 
B

BEES via AccessMonster.com

BEES said:
[quoted text clipped - 4 lines]
Thanks for your quick respond.
I got some idea from your sample DB
I am trying to Put D-Look In my total Mileage Qry which is quite complicated .

I will let you know how its goes
Thanks Again for your help.


Hi Bob
I tried different way to use your code in my Total Mileage Qry

Code
Public Function GetRate(dteMileageDate As Date) As Single
GetRate = DLookup("MileageRate", "tblRates", "[StartDate]<= #" & VisitDate
& "# And Nz([EndDate],#12/31/9999#)> #" & VisitDate & "#")
End Function

And Query
I have total Mileage Qry Which has is From
Reimbursement: Format([TotalMileage]*[MileageRate],"Currency")
Bank Record
I guess I need to use Visit ID From Visit Table

I add Visit ID field in the Mileage RateTB and Relate with VisitID in
VisitTable
Nothing working blank Result.

Please help. My Tables details I mention before.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top