I don't undertstand why top works bottom don't

accessfleet

Registered User.
Local time
Today, 01:28
Joined
Sep 29, 2010
Messages
91
Can anyone help me understand and fix?

works right, prompts for vendor number then prompts for start date and end date
PARAMETERS [Vendor#] IEEEDouble;
SELECT VENDORS.[VENDOR#], VENDORS.[COMPANY NAME], [t_PO-actions].ActionDate, [t_PO-actions].Desc, [t_PO-actions].Amt, [t_PO-actions].[Posted Date]
FROM VENDORS INNER JOIN [t_PO-actions] ON VENDORS.ID = [t_PO-actions].VendorID
WHERE (((VENDORS.[VENDOR#])=[Vendor#]) AND (([t_PO-actions].ActionDate) Between [Enter Start Date] And [Enter End Date]));


Does not work right Prompts for RadioUnit then prompts for start and end date but reports error ! This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifing the expression by assigning parts of the expression to variables. WHAT?
PARAMETERS [RadioUnit] IEEEDouble;
SELECT WORKORDERS.[RadioUnit], WORKORDERS.[Workorder number], WORKORDERS.[DPS Workorder], WORKORDERS.OpenWorkOrderDate, WORKORDERS.CloseWorkOrderDate, WORKORDERS.Instructions, WORKORDERS.[Supervisor/CrewRemarks], WORKORDERS.[Work type], WORKORDERS.[CLOSED WORKORDER], WORKORDERS.Miles, WORKORDERS.Hours
FROM WORKORDERS
WHERE (((WORKORDERS.RadioUnit)=[RadioUnit]) AND ((WORKORDERS.CloseWorkOrderDate) Between [Enter Start Date] And [Enter End Date]))
ORDER BY WORKORDERS.[Workorder number] ;


Muchas Grassious in advance..

John.
 
Last edited:
Try changing

WORKORDERS.RadioUnit)=[RadioUnit])

to
WORKORDERS.RadioUnit)=[Enter Radio Unit])

Could be to do with variable having samename as field in table.
 
Thanks David, I'll give it a try..

John.
 
Also, don't know why it would work in the first case but this appears to be incorrect:

PARAMETERS [Vendor#] IEEEDouble;

should be

PARAMETERS [Vendor#] Double;

There is no IEEEDouble datatype in Access.
 
Hi David: Y'all the man. Your suggestion worked. Just one thing, Now I get a prompt for RadioUnit, another prompt for Enter Radio Unit then the date prompts.

Just wondering how to remove the 1st prompt. It workd but double prompts might confuse me mechanics..

Again, thanks 2U, its alive..
 
If you don't want the first prompt for the radio unit why have you got it for a parameter?
 
I suggest using a FORM for input and not rely on prompts from the query. Then they can select things and you don't need to worry about prompts.
 
Hi David: You really know how to ask the right questions. The query works exactly right now.

I guess my only answer is that when want to make something work and don't know why it wont, I look at something that does and then try to make a working copy by modeling something that works withe the fields and tables I need.

Thank you very much for the interest and guidance. I gonna count today as a teachable day...

John.
 
Glad you made progress today. Remember climbing on the backs of giants is all good and well if you are not scared of heights.
 
Nice! My knees get a little weak, but I am not afrad.

I'll have to share that in the next staff meeting I am in.

John.
 
Last edited:
Hi Bob:

Now that the query works as it should. I plan on putting a button on the the work order form to allow mechanics to check on the fly, the work order history of the unit they are about to work on. The main reason for this is to limit the duplication of recently done work. With four mechanics it is possible to think something is needed when it was recently done. Mechanic A replaced rear brakes last month, Mechanic B is given a write-up asking the brakes be checked.
Mechanic B could ask Mechanic A unless he is sick, on vacation or just retired.

By running the query he gets a print preview of a report which show the rear brakes were just done so he may check the front brakes first, if no problem is found he has the option of checking rear brakes again but as likely as not he will find the real problem the first time, saving him redundant work of pulling the rear wheels and drums to check the rear brakes again.


A report that surveys all completed work orders includes all work done to all units. I was looking for something more specific, all work orders for a specific unit listed in descending order gives me useful data faster.

All this data base and programming is an interesting distraction to my regular work. When you thing about it, it is the same but different. When a car or truck limps in you look for reasons why, you decide what it needs to work better and then you fix what it needs.

In programming, you figure out what you need from the data base, you provide the necessary tables and fields, you then try to use it, nonperformance indicates something else is needed, you decide what else is needed and you fix and try again. Then it works just as expected and It will do it over and over working every time. Software horsepower replaces manual effort.

Thanks for your interest and help Bob.
 

Users who are viewing this thread

Back
Top Bottom