G
Guest
Hi Guys,
I am now battling to pass the result of a SQL string to a variable.
I can access the result that I need through the Dlookup function, but I
would like to get this right in SQL. Is this possible?
I have pasted the SQL string generated
by the QBE grid, but I keep on getting an error that that says "a RunSQL
action requires a SQL string as an argument"
personalcert = DoCmd.RunSQL "SELECT Count(certnumgen.Pilotcode) AS
CountOfPilotcode FROM certnumgen WHERE
(((certnumgen.Pilotcode)=[Forms]![Pilotdata]![Pilotcode]));"
personalcert is a string variable.
Ok guys I am sure I am doing something stupid here. Thanks for the help.
Kenny
I am now battling to pass the result of a SQL string to a variable.
I can access the result that I need through the Dlookup function, but I
would like to get this right in SQL. Is this possible?
I have pasted the SQL string generated
by the QBE grid, but I keep on getting an error that that says "a RunSQL
action requires a SQL string as an argument"
personalcert = DoCmd.RunSQL "SELECT Count(certnumgen.Pilotcode) AS
CountOfPilotcode FROM certnumgen WHERE
(((certnumgen.Pilotcode)=[Forms]![Pilotdata]![Pilotcode]));"
personalcert is a string variable.
Ok guys I am sure I am doing something stupid here. Thanks for the help.
Kenny