By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Setting up a flag/ follow up

P: 19
Hi guys.

i want a flag 2 go off within 5 days of doin a certain task (ie accepind a new clients' details & send some1 a mail aftawards, make an order via mail) Reason bein i wanna do a follow up and c if d requeted task has been attended to

Ma code:

Option Compare Database
Function Follow_up()
Dim Follow_up As String
Dim duration

Follow_up = "SELECT Customer_contact_details.* FROM Customer_contact_details WHERE Customer_contact_details.Date<Now()-5;"
MsgBox ("Please do a follow up on " & [Forms]![molo]![customercode] & ", " & [Forms]![molo]![Unique_ID] & ", " & [Forms]![molo]![CustomerName])

End Function

problem is i don't know where to put ma code coz i did it in a module and calles it in a macro as a function (runcode) but it's complainin dat it can't find d requested function

Pls kindly advise

Noks
Mar 15 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,347
This won't work.

1) I don't think you can create a variable with the same name as the function.

2) You assign a SQL statement to a string. This does nothing. What you're probably looking for is to create a recordset variable and then set the recordset to a SQL statement.

3) You have a superfluous variable: duration.

4) Your message box calls controls from a form that you have not described to us so I can only assume the form is tied to some query that returns those who need a follow-up. Which would mean that all the other code is unnecessary

5) You have to declare the function as a public function.
Mar 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.