P
PayeDoc
Hello All
This is my first forray into this type of code! I have a pretty long
function in which I need to use certain values from table [tax tables] - but
only the values on the record that meets a particular criterion. I want to
do this by defining all the fields from [tax tables] as a recordset, and
this is my attempt:
Dim rsTax As Recordset
Set rsTax = CurrentDb.OpenRecordset("SELECT [tax tables].*, months.[month
name]" & _
"FROM [tax tables] INNER JOIN months ON [tax tables].set = months.[default
tax set]" & _
"WHERE (((months.[month name])=[Forms]![frm x main]![month name]));")
I got the code by creating a corresponding query then copy/pasting the sql,
and adding the & _ line breaks.
But it's wrong: when I try to run this I get a "too few parameters" error.
Hope someone can help.
May thanks
Leslie Isaacs
This is my first forray into this type of code! I have a pretty long
function in which I need to use certain values from table [tax tables] - but
only the values on the record that meets a particular criterion. I want to
do this by defining all the fields from [tax tables] as a recordset, and
this is my attempt:
Dim rsTax As Recordset
Set rsTax = CurrentDb.OpenRecordset("SELECT [tax tables].*, months.[month
name]" & _
"FROM [tax tables] INNER JOIN months ON [tax tables].set = months.[default
tax set]" & _
"WHERE (((months.[month name])=[Forms]![frm x main]![month name]));")
I got the code by creating a corresponding query then copy/pasting the sql,
and adding the & _ line breaks.
But it's wrong: when I try to run this I get a "too few parameters" error.
Hope someone can help.
May thanks
Leslie Isaacs