Avatar of tesla764
tesla764
 asked on

SQL syntax and functionality

Query...
PARAMETERS intID Short, intACHType Short, txtPlanNumber Text ( 255 ), curAmount Currency;
UPDATE tbl_ACH_Manual_Details SET tbl_ACH_Manual_Details.ACHType = [intACHType], tbl_ACH_Manual_Details.PlanNumber = [txtPlanNumber], tbl_ACH_Manual_Details.Amount = [curAmount], tbl_ACH_Manual_Details.[Date] = date()
WHERE (((tbl_ACH_Manual_Details.ID)=[intID]));

Before the above query runs the value for
tbl_ACH_Manual_Details.ACHType = 3
Which comes from a form cboType.Value

This table simply contains this data. ID is numeric and Type is Text.
tbl_lkpACHManual_Types...

ID    Type
1     Emergency
2     Domestic
3     International
4     N/A

Goal - We want the Type "International" to be retreived from tbl_lkpACHManual_Types table, which is the 3rd one. This 3 value comes from a form which has cboType.Value of 3

I believe the SET tbl_ACH_Manual_Details.ACHType = [intACHType], part of the query is what needs to be changed. How would I code this so that we get the value "International" in this case.

If cboType.Value is 1 then "Emergency" would be retreived
If cboType.Value is 2 then "Domestic" would be retreived
If cboType.Value is 3 then "International" would be retreived
If cboType.Value is 4 then "N/A" would be retreived

Thanks in advance
Microsoft AccessSQL

Avatar of undefined
Last Comment
tesla764

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Simon

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
tesla764

ASKER
Off the bat this isn't working, but you at least pointed me in the right directio. I have something I can work with at least. I will figure this out.Thanks for your help.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck