Automating Expiration Date (and A Few Other Things)

Aug 6, 2007

Good morning to everyone.
I am hoping that you will be able to help me with a table that I am working on. I have almost no experience with access, so I am useless when it comes to this.

I have attached a condensed version of the database that I am working on (removed everything except the one table that I am working on) so that you can see and edit what I am working on.

The requirements are simply this.
-If "Status" = 'new inquiry' and has not been update in 6 months, automatically changes to 'inactive' and "probability of order" automatically changes to 0%

-"Initial Inquiry Date" is set to the date the Inquiry was added to the table (but user has ability to change it manually)

-*bonus* If ship quarter has passed todays quarter then change "Status" to 'inactive'.

I hope I have attached enough for everyone to be able to help.
Thank you very much in advance, I really appreciate it. :)

View Replies


ADVERTISEMENT

Automatically Populate Expiration Date

Jan 10, 2014

I have a form with a date of when training was completed. I would like to set it up so it displays the date of expiration which is one year from when the training was complete.

View 2 Replies View Related

Expiration Date Field Update Thingy

Feb 9, 2005

Hello everyone.. I'm new :).

I'm working on a school database project and I am developing a Gym subscription/registration system.

Basically, once a user enters his/her personal info, they are taken to a second form where they can enter the subscription plan type (there are three plans).

Now, this is what I'm stuck on.. When a user enters a subscription start_date, I want the next field 'Exp._Date' to update to a year later, automatically.

So for example, if you enter 09/02/2005 in the start_date field, then the next field would automatically be filled with 09/02/2006.

Is it possible? And more importantly, how? I'm fairly new to DB's so please lay it in laymens ;).

Thanks guys.

PS: A screenshot of the form is located below:
http://img226.exs.cx/img226/9293/dbsc3xi.th.gif (http://img226.exs.cx/my.php?loc=img226&image=dbsc3xi.gif)

View 11 Replies View Related

Queries :: Expiration Date - Older Than/ New Than With Dates

Nov 27, 2013

I've built an an update query that updates a Yes/No field "Expired?" to "Yes" if the expiration date has passed i.e. if the current date is newer than the expiration date. I thought this would translate into the current date being greater than the expiration date?

UPDATE Alert
SET Alert.[Expired?] = 'Yes'
WHERE Alert.Current_Date>Alert.Expiration_Date;

When I run this, it identifies the records to be updated, but then stops updating the fields due to "a conversion failure."

View 7 Replies View Related

IIF Statement Expiration Date Not Excluding NULL

Oct 8, 2013

I have this IIF statement however all empty cells are also coming up as Expired. How do I exclude empty cells?

Status: IIf([Expiration Date]>= Date() ,"CURRENT"," EXPIRED")

View 4 Replies View Related

Automating Date-Based Updates?

Jan 20, 2006

I am a new Access user. I have created a database to track and inventory animals brought to a local animal shelter. The database includes information such as when the animal was brought in, who dropped it off, when it was adopted (Hopefully!), etc. The database is being used by people who have limited computer experience and the challenge has been to automate it and simplify it as much as possible. I have created several Switchboard pages to try and accomplish this.

I have done research through Google and MS support and have found little help with a solution to this problem:

When an animal comes to the shelter, it is held for three days before it becomes available for adoption. I have created seperate fields for Date In Day, Date In Month and Date In Year. There is also a field detailing the animals adoptability status. This field is left blank in the intake process, and is then manually updated to Adoptable, Biter, etc., after the three day period. Is there a way to automate the Adoptability Assessment Field (which is a Lookup Table Field) so that it changes from blank to Adoptable after the three day period? (We have very few animals come in that are marked as Biters, so I just need the field to change over to Adoptable after three days have passed. Unless a solution can be presented to filter animals with Biter status out of the solution.)

I truly appreciate any help that can be offered.

View 4 Replies View Related

30 Day Expiration..... Baxter Help!!!

May 25, 2004

Bax can you take a look at the attached zip which is a VERY small sample database with the VB Code to make it expire in 30 days. It is pretty cool, you can not even change the system date on your computer because this will pick it up and give you an error message and not let you open the db. I can not get this thing to work with my database and I know I must just be missing something. It is real simple, 1 table, 1 Code and 1 autoexec macro.


I am a novice using VB and though I understand this code somewhat I am still missing something. I know you are good at this stuff and thought maybe you could help.

Thanks buddy.

~ Bill

View 9 Replies View Related

Need Some Help With A Few Different Things

Jul 13, 2005

Hi there,

I need to pick someone's brains with the few queries I have with Access listed below.

1:- Emailing data entered on a form.
I have a made a rough call logging datababse, this allows users to log information about calls that they take. From time to time it will be required for the user to submit a refund request. What I am wanting to do is have this on a seperate form that the user can open and have it automatically populate with some of the information from the main call log form. Once they have completed the credit request form I would like to have a button on there that they can click which will email that record to a pre-defined email address with a pre-defined subject.

2:- Populating a Excel spreedsheet with data from a particular record
I have a form where various bits of customer information is stored, Is it possible to create a button that will automatically export certain fields from the form and put them into a spreedsheet in the appropriate fields.

3:- Linking data from one form to another
On a form I have a field for Support Agent, What I would like to do is when someone selects this agent from a drop down list that persons details automatically fill into the contact fields on this form. Can this be done?

Sorry if these are a bit silly but as you can tell I am a access muppet

View 1 Replies View Related

How To Do These Things ?

Nov 2, 2005

Hello all !

I am kinda new to access and made a transport database but it needs some changes which are out of my knowledege so i am hoping that you guys can help me out. There are the 2 things that i would like to do in my forms:

1=, I have a form where all the new cars are added to DB. Fields are Vehicle Code, Type, Brand, Model and Model year. Then I have a transaction form where vehicles are either assigned to employees or to garage etc.. What i would like to do in this form is that when i select a Vehicle Code, the remaining fields i.e. Type, Brand, Model and Model year of that partcular Vehicle Code should appear in thier respective fields of the transaction form.

2=, Now a little difficult part, in the same transaction form i want a field where the name of the current username appears and also a field with current date.

Now moving on to Transaction Type thingy. I want to two options button ( Issue Vehicle and Cancel Vehicle). If option " Issue Vehicle" is selected, a field i.e. a combo box consisting of To Employee and To Garage appears. And then when "To Employee" is selected two fields i.e. Employee No. and Name appear in a kind of frame.( data of both these fields are in other table and will appear in combox boxes). When "To Garage" is selected a field "reason" appear in a frame in place of above stated two fields.

I hope i am making some sense. I know i have to make a table for all these fields but dunno how to do all these things in forms..

Looking forward to your replies and thanks in advance.

View 10 Replies View Related

Can Programmer Install A Database Expiration

Nov 27, 2006

I had some work done on my Database a few weeks ago and it works great.

I just got an email from the guy who did the work and he wants me to pay him more money....he said he forgot to bill me for 6 hours.

I told him I didn't think that was fair and wasn't really willing to pay for more hours....he then said he never sent the "non-expiry" versions of the databases.....he also said I have 15 days left until they expire.

Considering I done additional work on them I was wondering if this is possible?

Bruce

P.S. I hate being taken advantage of.....he was really good to work with but now he's trying to rob me.

View 8 Replies View Related

Color On Certain Things

Apr 14, 2006

Hey guys..

I have a form that displays inventory of goods.

there is a list box with a list all property. If they items are sold a sales order number appears next to it. Now with that in mind how can i have something that if there is a sales order number on that item then highlight it with a color?

View 1 Replies View Related

Query 2 Things At Once

Sep 13, 2007

Hi,

I have a membership db with 120 members in it. Each record form includes a dropdown field for 'status' (training completed, no training, certificated etc), and another dropdown for 'profession' (childcare, nursing, education etc)

I am able to run 2 separate queries;
I can run a query to view all those who have completed training using
Like "*" & [Enter Status] & "*"

And I can also query the professions with Like "*" & [Enter Profession] & "*"

What I would like to do is to query members who are in education but have had no training yet. Is there any way I can do this?

Many thanks

Adrian

View 2 Replies View Related

Need Help On A Few Small Things

Nov 21, 2006

I'm fairly new to Access (2000 is the version im using), and I'm not sure how to do several things within a form:

1) make cursor in a text box jump to the front (left) when clicked on
2) Lock (and grey out) a text box once data has been entered into another
3) assign a field to correspond with another, and to have this shown on the form (ie: having a list of names and their corresponding phone numbers assigned to each; then on the form, having a combo or list box with the names that a user can select- once a name is selected, their phone number appears automatically in another text box)
4)Locking screens or subforms when moving on to another (either by pressing a button to open another form, or by selecting a field in another subform)

thank you in advance for your help and advice

View 1 Replies View Related

Records/Fields Expiration Access Question

Apr 8, 2008

Hi, I was wondering if there was a way to put a setting on records or fields to expire automatically.

Thank you

View 3 Replies View Related

Queries :: Display Expiration Dates For Next 30 Days

Nov 13, 2014

My database keeps track of training for employees, some of which expires after a period of time, which is in the tables. I need to create a query that displays only the employees and the training that expires during the next 30 days. I have a query that displays the expiration date (this field uses DateAdd and adds the expiration term to the date the employee completed the training) I am trying to add a criteria to this field. I found <=Date()+30 in my searches but that displays all of the records from 12/14 and back. I have tried all kinds of versions of this (obviously, not the correct one) and either get all records or none. (Yes there are records in the database that fall within the the period I am trying to display - that is something that I have been known to forget)

Is it because I am using criteria in a field that is based on DateAdd or what would be the correct criteria for this?

View 3 Replies View Related

Decimal Places Of All Things!!

Aug 5, 2005

Hi,

I'm having a realllllly frustrating problem. I'm trying to enter the number 101.1 in a field, but whenever I enter it and hit tab to move to the next field it just truncates the number to 101. I've changed the number type, the number of decimal places, ect - everything! But it still changes my 101.1 to 101 after I move to the next field.

Help muchly appreciated.

View 8 Replies View Related

Hidding Things & Passwords

Sep 21, 2005

Hello.

I want to prevent people accessing the control boxes on a 'satalite' mdb. I have hidden the control at the top through the start up options, but havent prevented the special keys as I occassionally need to get in this database for error fixing and such like. I want to know if I can put a password on this function, so that if they know it and try it it asks for a password before opening the control windows/table pages etc.

does anyone know if this is poss and if so how too ???

Thanx in advance for your time

View 2 Replies View Related

Big Problems For Simple Things

Feb 13, 2006

Sorry for posting this here but it doesn't fit in just one catagory.

I'm having a bit of trouble using a manual input table and ODBC table to filter information through query into form view. Let me shed a little light on what's, what.

I'm looking at adding the totals of hours scanned/worked (sum of periodOfEvent) on job per "workcenternumber" (Scanning hour report - table [ODBC] SQL database on another server) then subtracting them from the hours given (job planning table - table [manual input]) to display hours remaining on project through query. [ITEMA]-[ITEMB]

Here's the problem: I can filter workcenternumber in the ODBC table "Scanning Hour Report" to display the various work center numbers, in this case it would be the following items:

BAL-HIGH
BAL-LOW
CM-TECH
CR-TECH
DW-JNR
DW-SNR
ENG
FS-JNR
FS-SNR
MS-HIGH
MS-LOW
MS-MED
MS-TECH
QA-TECH
SB-TECH
WB-BOIL
WB-HEAT
WB-WELD
WM-TECH

now I'm sitting with a query for each of these work center numbers with each query looking up hours given & subtracting hours worked to give you x amount hours remaining. Here are two example of these queries:

-------------------------------------------------------------------------------
--==1==--

SELECT DISTINCTROW [Scanning Hour Report].WBSElement, [Scanning Hour Report].WorkCentreNumber, [Job Planning].[Project Number], [Job Planning].Customer, [Job Planning].Description, [Job Planning].[Planned Start], [Job Planning].[Progress %], [Job Planning].[Planned Finish], [Job Planning].[Actual Finish], [Job Planning].Consultant, [Job Planning].Team, Sum([Scanning Hour Report].PeriodofEvent) AS [Sum Of PeriodofEvent], [Job Planning].[BAL-HIGH Hours Given]-[Sum Of PeriodofEvent] AS [Hours Remaining BAL-HIGH], [Job Planning].[BAL-HIGH Hours Given]

FROM [Job Planning] INNER JOIN [Scanning Hour Report] ON [Job Planning].[Project Number] = [Scanning Hour Report].WBSElement

GROUP BY [Scanning Hour Report].WBSElement, [Scanning Hour Report].WorkCentreNumber, [Job Planning].[Project Number], [Job Planning].Customer, [Job Planning].Description, [Job Planning].[Planned Start], [Job Planning].[Progress %], [Job Planning].[Planned Finish], [Job Planning].[Actual Finish], [Job Planning].Consultant, [Job Planning].Team, [Job Planning].[BAL-HIGH Hours Given], [Job Planning].[BAL-HIGH], [Job Planning].[MS-TECH], [Job Planning].[MS-TECH Hours Given], [Job Planning].[BAL-LOW], [Job Planning].[BAL-LOW Hours Given], [Job Planning].[CM-TECH], [Job Planning].[CM-TECH Hours Given], [Job Planning].[CR-TECH], [Job Planning].[CR-TECH Hours Given], [Job Planning].[DW-JNR], [Job Planning].[DW-JNR Hours Given], [Job Planning].[DW-SNR], [Job Planning].[DW-SNR Hours Given], [Job Planning].ENG, [Job Planning].[ENG Hours Given], [Job Planning].[FS-JNR], [Job Planning].[FS-JNR Hours Given], [Job Planning].[FS-SNR], [Job Planning].[FS-SNR Hours Given], [Job Planning].[MS-HIGH], [Job Planning].[MS-HIGH Hours Given], [Job Planning].[MS-LOW], [Job Planning].[MS-LOW Hours Given], [Job Planning].[MS-MED], [Job Planning].[MS-MED Hours Given], [Job Planning].[QA-TECH], [Job Planning].[QA-TECH Hours Given], [Job Planning].[SB-TECH], [Job Planning].[SB-TECH Hours Given], [Job Planning].[WB-BOIL], [Job Planning].[WB-BOIL Hours Given], [Job Planning].[WB-HEAT], [Job Planning].[WB-HEAT Hours Given], [Job Planning].[WB-WELD], [Job Planning].[WB-WELD Hours Given], [Job Planning].[WM-TECH], [Job Planning].[WM-TECH Hours Given]

HAVING ((([Scanning Hour Report].WorkCentreNumber)="BAL-HIGH"));


--==2==--

SELECT DISTINCTROW [Scanning Hour Report].WBSElement, [Scanning Hour Report].WorkCentreNumber, [Job Planning].[Project Number], [Job Planning].Customer, [Job Planning].Description, [Job Planning].[Planned Start], [Job Planning].[Progress %], [Job Planning].[Planned Finish], [Job Planning].[Actual Finish], [Job Planning].Consultant, [Job Planning].Team, [Job Planning].[MS-TECH Hours Given], Sum([Scanning Hour Report].PeriodofEvent) AS [Sum Of PeriodofEvent], [Job Planning].[MS-TECH Hours Given]-[Sum Of PeriodofEvent] AS [Hours Remaining]

FROM [Job Planning] INNER JOIN [Scanning Hour Report] ON [Job Planning].[Project Number] = [Scanning Hour Report].WBSElement

GROUP BY [Scanning Hour Report].WBSElement, [Scanning Hour Report].WorkCentreNumber, [Job Planning].[Project Number], [Job Planning].Customer, [Job Planning].Description, [Job Planning].[Planned Start], [Job Planning].[Progress %], [Job Planning].[Planned Finish], [Job Planning].[Actual Finish], [Job Planning].Consultant, [Job Planning].Team, [Job Planning].[MS-TECH Hours Given], [Job Planning].[MS-TECH], [Job Planning].[BAL-HIGH], [Job Planning].[BAL-HIGH Hours Given], [Job Planning].[BAL-LOW], [Job Planning].[BAL-LOW Hours Given], [Job Planning].[CM-TECH], [Job Planning].[CM-TECH Hours Given], [Job Planning].[CR-TECH], [Job Planning].[CR-TECH Hours Given], [Job Planning].[DW-JNR], [Job Planning].[DW-JNR Hours Given], [Job Planning].[DW-SNR], [Job Planning].[DW-SNR Hours Given], [Job Planning].ENG, [Job Planning].[ENG Hours Given], [Job Planning].[FS-JNR], [Job Planning].[FS-JNR Hours Given], [Job Planning].[FS-SNR], [Job Planning].[FS-SNR Hours Given], [Job Planning].[MS-HIGH], [Job Planning].[MS-HIGH Hours Given], [Job Planning].[MS-LOW], [Job Planning].[MS-LOW Hours Given], [Job Planning].[MS-MED], [Job Planning].[MS-MED Hours Given], [Job Planning].[QA-TECH], [Job Planning].[QA-TECH Hours Given], [Job Planning].[SB-TECH], [Job Planning].[SB-TECH Hours Given], [Job Planning].[WB-BOIL], [Job Planning].[WB-BOIL Hours Given], [Job Planning].[WB-HEAT], [Job Planning].[WB-HEAT Hours Given], [Job Planning].[WB-WELD], [Job Planning].[WB-WELD Hours Given], [Job Planning].[WM-TECH], [Job Planning].[WM-TECH Hours Given]

HAVING ((([Scanning Hour Report].WorkCentreNumber)="MS-TECH"));
-------------------------------------------------------------------------------

....these queries would display:

WBSElement - IT123456789012
WorkCentreNumber - BAL-HIGH
Customer - Customer000001
Description - High Speed balancing of turd filled drum
Planned Start - dd/mm/yyyy
Progress % - 95.00%
Planned Finish - dd/mm/yyyy
Actual Finish - dd/mm/yyyy
Consultant - Consultant1
Team - TEAM#
BAL-HIGH Hours Given - 20
Sum Of PeriodofEvent - 13.5
Hours Remaining - 6.5

The project number(Job planning table) and the WBSELEMENTNUMBER(Scanning Hour Report have linked via relationships tab

as an example... [see pic1]

now if the field finds no record in the ODBC it displays no information which would be correct in a sense. [see pic2]
BUT!
Here comes the complicated part.

NB!!:INSTEAD of displaying no information how would I go about making the ODBC fields display default value of 0 so when I add all the above mentioned workcenternumbers to ONE form, instead of displaying NOTHING when it finds no values for one of the workcenternumbers it will instead display that "50" hours given even if "0" hours were worked thus "50" hours still remain for that project number's work center number.
Is there an easier way of filtering different work center numbers to one form and summing figures from there or what?

To wrap it up all I'm looking for is a form that checks the workcenternumber and the hours captured on the ODBC "Scanning hour report" and subtracting it from the table "Job Planning" where the WBSELEMENT & Job Number as well as the work center numbers tie up to give me a total value of hours remaining. If nothing is found for one workcenternumber it displays value 0 instead of a entire blank page.
If you have a sample database I haven't seen that u think could come in handy it would be helpfull too.

Hope I didn't confuse you, yet... :rolleyes:

Thanks in advance
solbane

View 4 Replies View Related

Weird Things Happening HELP

Dec 6, 2006

Hello,

I have simple invoice database, tyhe old one I made works fine, trying to make a newone always simple but now Access is not helping me for some reason,,,, Can you look at this? I create an invoice form using wizzard i join invoices and invoices details to it and from there I create my Invoive form that has the invoice info and the details.... I change some stuff for looks and easyness... Mostly change text boxes to combo boxes... I did this in office 2003 and had the same results than in office 2002, Why dont know... Once I create the invoice from and change the text boxes combos and ofcourse set everything else, once I pick a product from the detail form I get the product but I dont get its price. Now on my other older database made excatly the same way it works!!!! WHY IIIIIIII DONT KNOW!!! please help me:(

I have attached both db so you can look at them!!!


Thanks

View 2 Replies View Related

Autonumber Doing Funny Things

Jan 24, 2007

Hello,

I just noticed something very strange - in a table of mine, when I create a new record with the form, the autonumber is an existing number. Say the last record had ID 400, then the "new" record is assigned an autonumber ID of 300.
Of course, record creation fails that way.
But with every attempt, the new autonumber moves one up, so eventually it'll start making unique numbers again.

Does anybody have an explanation for this odd behaviour?

View 7 Replies View Related

Switchboards- Different Things On Different Pages?

Aug 21, 2007

This is the first time ive used the switchboard so hopefully this will be just a quicky!

Bascially i have a main switchboard which has 3 buttons. These buttons all link to different switchboard pages.

THE PROBLEM :- I have labels on the main switchboard and these are all appearing on the consequent switchboard pages. Is there a way of assigning these just to the main switchboard and not the other pages?

Thanks, any advice would be most appreciated!

View 11 Replies View Related

Queries :: IIF Statement To Calculate Expiration Dates Within Query

Jun 15, 2015

I'm trying to build a query with an iif statement to calculate expiration dates within a query. For some reason what i'm trying to do is not working as expected.

Here's the situation. Every employees with an exception of two employees in the company has an expiration 2 years after the class took place. The two exceptions are the certified instructors who's training certification is good for three years.

I've created a query with the employeeid, training subject, and maxoftraining date.

I'm trying to write an if statement to give me the expiration date based on the above information. Here's what I have so far; however its not calculating based on the criteria.

Expiration: IIf([tblemployee]![EmpID]=1 Or 2,DateAdd("yyyy",3,[maxoftrainingdate]),DateAdd("yyyy",2,[maxoftrainingdate]))

At this point in time, all "expiration" dates are showing + 3 years rather than just the Employee ID's 1 and 2 and the rest +2 years.

View 2 Replies View Related

Creating Database To Manage Expiration Dates Of Medications

May 6, 2014

I am trying to create a database to analyze expiration dates of multiple products.

Let me lay out what I am trying to accomplish.

I have 5 ambulances, each ambulance has the same quantity of medications on it. There are three separate locations medications are stored on each truck. Each month I need to be able to update expiration dates, query what medications will expire by a set date and where exactly they are located.

SO here is the structure as I see it.

Ambulance 1 contains, a drug drawer with approximately 30 different medications, a trauma bag with about 10 different medications, and a blood glucose kit with 2 different medications. Now some of medications are repeated in the different locations, but have different quantities. The medications will never all have the same expiration date, and medication 1 might have 8 vials, where medication 2 may have 4 vials. I would like my form to be dynamic based on the inventory level of the medications. That way if we decide to keep 10 vials instead of 8 the form will then require the 2 extra data points.

The tables I have created so far...

table 1 lists all the ambulances
table 2 lists medications in the drug drawer and the inventory level
table 3 lists medications in the trauma bag and the inventory level
table 4 lists medications in the blood glucose kit and the inventory level

I need to create a table to store my expiration dates for each of the locations in each of the ambulances.

I need to create a form to simplify the entry of the data into those tables and I want the form and table to be dynamic to the inventory level.

View 3 Replies View Related

Migrating Access To Bigger Things

Dec 14, 2005

I have a somewhat complex question.

We currently run Access 97 in the following way. We are looking for a solution where new members can access our data and change it using the internet. We are not sure of the best way.

Our database is split between "data" and "front-end". The "data" is kept on our win2000 server and is split into a "master" and several replicas. Some employees run their "front end" acceess programs on fixed computers attached to our network and simply attach to the "master" "data" database on our server. 4 employees use laptops and run their "fronends" by attaching to their own "replicas" of the "master" which they carry around with them. Once in a while, ususally daily, they synchronise their "replica" with the "master" on our server by simply attaching to our network using ethernet or WiFi.

What would be the best way to allow new members to join in the fun? There could be as many as 10 new members (brining the total to 16). The main problem is that they are located in different countries and ideally need to have a web or VPN access to our server. Does anyone have some suggestions? Should we migrate to SQL?

The database "data" is about 180Mb in size and has 40 odd tables that are used in a complex way by the "front ends". All queries are stored in the "front ends".

?? I would really appreciated some ideas..

Thomas

View 4 Replies View Related

Runtime Performance - How To Structure Things

Jan 22, 2008

Hello,
I have a performance, probably related to my query and calculation structure and would be seeking your advice.

The DB is basically an airline schedule, with to make things simple, an entry for every flight. (tblSchedule). This table has information of origin and destination, airline, flight times, and aircraft type (to make things simple). The table relates to several other tables (tblAirport, tblAirline, tblAircrafttype), for the obvious information reltated to those. Other than that, there is a tblAircraftConfig (which has information, related to Airline and Aircrafttype - among other things the number of seats for that aircraft type and airline).

Now I need to do several evaluations for the (very large) tblSchedule. Those evaluations are - in principle - straightforward, but due to the sheer mass of data and the way I probably do things, give me a sheer headache, in terms of runtime.

The calculations, actually need to be done on every entry in the schedule table: Here is the data that is calculated:

- Flighttime : (by simply substracting departure and arrival times, all part of tblSchedule, but need a lookup of time difference, between arrival and departure airport).

- Number of seats : actually a lookup in the tblConfiguration, based on airline and aircrafttype, part of tblSchedule), but since a weighted average of found entries has to be calculated, I do this via a function call

- Available seat miles (most tricky one): a multiplication of the seats (see above) with the flight distance. This flight distance is calculated using a formula (with all kinds of sin and cos and atn functions), grouped in a function call, which needs to work on a set of geographic longitude and latitude data of the arrival and departure airport. This data is included within tblAirport.

At the end of the day, I don't need these indicators per flight (single tblSchedule record), but summed across flights, e.g; per a/c type and airline, per city pair, per airline and departure etc.

As a said, some rather complicated formulae for a database application, but nothing to win the noble prize with. However, the number of calculations to be carried out just kills the run time.

- First shot: create a "full query" with a defined query, include all n:1 relationships into the query, and for those, n:m relationships, make a davg lookup. Calculate the indicators for every flight, and sum up in a report. Result: awful runtime.

- Second shot: create a grouped query, summing things within the query. Problem is the lookup, which I need to make into the n:m relationship of the a/c config. I worked a way around this by creating a formula, which does this lookup for me with either the dlookup formula or a recordset and then run through the records. Anyway, runtime is disgusting.

- Third shot: create a formula call for the entire data, which does the same thing that the query does, with running through the data in a recordset (which is handed over to the formula). The formula, just hands back the readily calculated number. Runtime: let's not talk about it.

So this is a call for help. Doesn't seem like a complicated problem, but that's the difference between theory and reality.

The main issue - I believe is the number of lookups and 'complicated' calculations - e.g. calculating the distance between two airports. The thing is, the number of calculations is also exaggerated by the fact, that it repeats the calculation for every single flight. Now there are a lot fewer airport pairs than flights, of course. So I tried:

- Fourth shot: Make a split query. First of all, a SELECT First query, which generates a list of airport pairs, and calculates the airport distance only for the pair, once and for all in the query. Then base the second query on this first query selecting the rest of the schedule data (the flight time, the seats etc.). In theory, a lot fewer calculations need to be made, sinc eflight distance is calculated only for 250 airport pairs, instead of 25,000 flight entries. But: result - pathetic.

HELP!

Thanks

Jan

View 1 Replies View Related

MS Access Query Help. Expression For Calculating Multiple Expiration Dates.

Feb 28, 2008

Hi everyone
I'm a very very new access user so many apologies in advance for when I have no idea what I"m talking about.

I'm working on creating a report that will display multiple expiration dates. Currently I have an employee database, not created by me, that has all of our employees professional licenses listed.

Prof license, auto license, liability, etc.

I want to create a report that will tell me what has already expired or will expire in the next 30 days.

I did use this
Between DateAdd("d",-30,Date()) and Date() and it is bringing back info up to 2009. which isn't what I need. I'm sure I'm doing something wrong here.

I want anything that has expired regardless of the date from today, before today, and 30 days from today but I don't care about anything more than 30 days from today's date.

I noticed that when I looked at the existing database that the fields are set as text fields. I tried to change them to dates and it gave me a "deleting 106" records error message. Yikes!

Any help would be appreciated. I don't really understand expressions and I don't understand if I'm supposed to put the actual date in parentheses or what. Please pardon my ignorance.

Many many thanks.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved