Hi there,
I have a little problemo.
I want to change the recordsource property of a form using the method descibed below:
This method works;
dim tempfield
tempfield = 1000
me.recordsource = "SELECT DISTINCT Customers_AU.* FROM Customers_AU INNER JOIN Invoices_AU ON Customers_AU.CustomerId = Invoices_AU.CustomerID WHERE (Invoices_AU.InvoiceID > '" & tempfield & "')"
But i want to do the following which returns "Invalid use of me keyword".
dim tempfield
dim sql
tempfield = 1000
sql = "SELECT DISTINCT Customers_AU.* FROM Customers_AU INNER JOIN Invoices_AU ON Customers_AU.CustomerId = Invoices_AU.CustomerID WHERE (Invoices_AU.InvoiceID > '" & tempfield & "')"
Me.RecordSource = sql
Can anyone tell me a way to do this?
Regardos Akartos =)
I have a little problemo.
I want to change the recordsource property of a form using the method descibed below:
This method works;
dim tempfield
tempfield = 1000
me.recordsource = "SELECT DISTINCT Customers_AU.* FROM Customers_AU INNER JOIN Invoices_AU ON Customers_AU.CustomerId = Invoices_AU.CustomerID WHERE (Invoices_AU.InvoiceID > '" & tempfield & "')"
But i want to do the following which returns "Invalid use of me keyword".
dim tempfield
dim sql
tempfield = 1000
sql = "SELECT DISTINCT Customers_AU.* FROM Customers_AU INNER JOIN Invoices_AU ON Customers_AU.CustomerId = Invoices_AU.CustomerID WHERE (Invoices_AU.InvoiceID > '" & tempfield & "')"
Me.RecordSource = sql
Can anyone tell me a way to do this?
Regardos Akartos =)