query help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm new at writing queries, and I can't get this one to work.
I keep getting a:
"Syntax error (missing operator) in query expression '[fullname] from
january'."
The query is:

Update January
Set [driver number]=[400_ID], [driver name]=[fullname]
From January, Namelist
Where [delmo]=[FBN];

What I'm I missing?
Thanks in advance for your help.
 
The query syntax is different in Access than other databases you are used to.
Look at this:
UPDATE TvwMaster INNER JOIN TvwRaw ON (TvwMaster.CellidPerSwitch =
TvwRaw.F3) AND (TvwMaster.TVWDate = TvwRaw.TvwDate) AND (TvwMaster.Sectorid =
TvwRaw.F4) SET TvwMaster.strFileFromField = [forms]![frm]![ctlFileFromField],
TvwMaster.DriveTester = [F16], TvwMaster.CallBackNumber = [F17],
TvwMaster.InitVerNum = [F18], TvwMaster.InitVerTowLatLong = [F19],
TvwMaster.InitVerTowAddress = [F20], TvwMaster.InitClassService = [F21],
TvwMaster.PhaseIITimeAftRebid = [F22], TvwMaster.PhaseIILatLong = [F23],
TvwMaster.PassFail = [F24], TvwMaster.Comments = [F25],
TvwMaster.PhaseIITestDate = [F26], TvwMaster.UNC = [F27], TvwMaster.MappedYN
= [F28]
WHERE (((TvwMaster.strFileFromField) Is Null Or
(TvwMaster.strFileFromField)="") AND ((TvwRaw.F17) Is Not Null)) OR
(((TvwMaster.strFileFromField) Is Null Or (TvwMaster.strFileFromField)="")
AND ((TvwRaw.F18) Is Not Null)) OR (((TvwMaster.strFileFromField) Is Null Or
(TvwMaster.strFileFromField)="") AND ((TvwRaw.F19) Is Not Null));

That's a bit complicated for demo purposes. What you ought to do is join
tables in an update queries and go to the View menu and then "SQL View".

-Tom
 
Phil,

It is not clear what you are trying to achieve here. But an Update
Query does not have a From clause in the SQL. Have you tried using the
Query designer in Access? If not, I recommend it.
 
Back
Top