Enter "Parameter Value"

  • Thread starter Thread starter JR Hester
  • Start date Start date
J

JR Hester

AccessXP on WinXP

Attempting to update a series of records from a LINKED table. The following
SQL statement results from the design view settings to replace classnumber
field in the datainport table with the ClassID filed contents in teh linked
table tblClasses. This returns a Enter PArameter VAlue dialog box. I am
accustomed to getting this dialog when I have misspelled a variable name, but
I used the list of tables and fields to verify that I have the correct
variable names.

What suggestions can you offer to the sql below?

UPDATE dataimport1 SET dataimport1.[Class Number] = ([tblClasses]![ClassID])
WHERE (((dataimport1.[Course Title:])=[tblClasses]![Classname]));


Thanks in advance for the fantastic ideas typically offered here
 
Your query does not include the tblClasses table, so the query must ask you
for the value of [tblClasses]![ClassID] and of [tblClasses]![Classname].

You'll need to change your query to something like:

UPDATE dataimport1
INNER JOIN tblClasses
ON dataimport1.[Course Title:]=[tblClasses].[Classname]
SET dataimport1.[Class Number] = [tblClasses].[ClassID];
 
AccessXP on WinXP

Attempting to update a series of records from a LINKED table. The following
SQL statement results from the design view settings to replace classnumber
field in the datainport table with the ClassID filed contents in teh linked
table tblClasses. This returns a Enter PArameter VAlue dialog box. I am
accustomed to getting this dialog when I have misspelled a variable name, but
I used the list of tables and fields to verify that I have the correct
variable names.

What suggestions can you offer to the sql below?

UPDATE dataimport1 SET dataimport1.[Class Number] = ([tblClasses]![ClassID])
WHERE (((dataimport1.[Course Title:])=[tblClasses]![Classname]));

Thanks in advance for the fantastic ideas typically offered here

Should [Course Title] have a colon in the field name? That's probably
giving you fits. What parameter is it looking for? That should tell
you where to look in your SQL.

Hope this helps,
Chris M.
 
It would be a big help to know what 'parameter' it is looking for...
I don't see where tblClasses is coming from???
Did you get a syntax error saving this SQL?
 
Thanks Ken
I recognised that a little while ago and I added the table to the query--
everything worked well after that.

Ken Snell (MVP) said:
Your query does not include the tblClasses table, so the query must ask you
for the value of [tblClasses]![ClassID] and of [tblClasses]![Classname].

You'll need to change your query to something like:

UPDATE dataimport1
INNER JOIN tblClasses
ON dataimport1.[Course Title:]=[tblClasses].[Classname]
SET dataimport1.[Class Number] = [tblClasses].[ClassID];

--

Ken Snell
<MS ACCESS MVP>



JR Hester said:
AccessXP on WinXP

Attempting to update a series of records from a LINKED table. The
following
SQL statement results from the design view settings to replace classnumber
field in the datainport table with the ClassID filed contents in teh
linked
table tblClasses. This returns a Enter PArameter VAlue dialog box. I am
accustomed to getting this dialog when I have misspelled a variable name,
but
I used the list of tables and fields to verify that I have the correct
variable names.

What suggestions can you offer to the sql below?

UPDATE dataimport1 SET dataimport1.[Class Number] =
([tblClasses]![ClassID])
WHERE (((dataimport1.[Course Title:])=[tblClasses]![Classname]));


Thanks in advance for the fantastic ideas typically offered here
 
Did Not get a syntax error when saving the query. Ken hit it teh nail on the
head. Once I added the tblClasses to the query data source, worked just fine

mscertified said:
It would be a big help to know what 'parameter' it is looking for...
I don't see where tblClasses is coming from???
Did you get a syntax error saving this SQL?

JR Hester said:
AccessXP on WinXP

Attempting to update a series of records from a LINKED table. The following
SQL statement results from the design view settings to replace classnumber
field in the datainport table with the ClassID filed contents in teh linked
table tblClasses. This returns a Enter PArameter VAlue dialog box. I am
accustomed to getting this dialog when I have misspelled a variable name, but
I used the list of tables and fields to verify that I have the correct
variable names.

What suggestions can you offer to the sql below?

UPDATE dataimport1 SET dataimport1.[Class Number] = ([tblClasses]![ClassID])
WHERE (((dataimport1.[Course Title:])=[tblClasses]![Classname]));


Thanks in advance for the fantastic ideas typically offered here
 
Back
Top