I have attempted to use the following IIF statement in a query, with no success.
Iif([Branch]="580" OR "585", Iif(Month([Estimate_Comple ted])=Month(Now()), [Charge]=[Charge]+40), Iif(Month([Estimate_Comple ted])=Month(Now()), [Charge]=[Charge]+100) Iif(Month([Layout_Complete d])=Month(Now()),[Charge]=[Charge]+100))
I tried to include a field in my query name Charge using the,
Charge:Iif(...c ode...
User Profile
Collapse
-
Iif Statement - Operand Error
-
Query/Report - Calculate using If statements
I have a simple query, which consists of a few project dates, which in return need to be charged based on completion.
That said, I wanted to create a CHARGE field which would calculate the total charge based on the projects completed (Estimates & Layouts). Just to make this complicated, there are 2 branches that get discounted charges. Below, I have included the if statements that I desire to take affect, I'm not sure how to... -
VBA Search Code Error
I have included an unbound field called [search] which is used to quickly move to the desired record, by searching the last name field.
I have been using this code for a few years, with only one hitch...if the entry is greater than the last record (sorted alpha), i get the following error;
3021 modexpres.binar ysearch DAO.Field No current record
(eg. if the last sorted record is Zimmerman, and I search... -
I've been playing with the code, and I have it working as far as sending the first 255 characters of the BCC field. Now, I created a form with a MEMO field called BCC, which I have successfully transfered all the email addresses to, except again, they do not transfer to the Outlook Email.
Aaaahhhhh! I'm losing my mind over this. Is there better code than the SendObject, which will avoid the 255 character limitation? -
Access/VBA - Sending Email Problem
Below is the code I'm trying to use to create a blank email with the bcc list populated from a query.
(1) I have tested the codes output of the "rcpts" field, and counted it as well - OK
(2) I've removed the "rcpts" field from the bcc option of the SendObject tag - OK
(3) I tried inserting the DoCmd.SendObjec t line into the loop and used the .Field("EmailNa me") as bcc - it worked OK
...Last edited by Killer42; Apr 1 '07, 12:45 AM. Reason: Please use [CODE]...[/CODE] tags around your code. -
The problem I'm having in not sending the email, but rather, referencing the email addresses from the database into the bcc field.
Can anybody give me some example code to gather the email addresses from my query into the bcc field of a single blank email.
ThanksLeave a comment:
-
MS Access - Send Email to Query List
I am desperate for some code that works, I had no success with my last posted thread. Instead of showing the code I've used (not working), please post a working code to help me out.
I have a simple contact database, I've queried a list of email newsletter subscribers, I want to insert these email addresses into the BCC field of a new/blank email (default email program). How can I do this?
Thank you in advance of mighty... -
In the code that I included in the first thread, Can you tell me if I have enough information in the following code;
Set rst = db.OpenRecordse t("EmailInfo_Cl ients")
The query name that I want to use as the record source is EmailInfo Clients (no underscore), although I've tried this with underscore, no underscore with [ ] and without the [ ]Leave a comment:
-
I tried adding the semi-colon; still nothing
When I debug the code, I get no errors, when I run the command, I get no results and no errors...
What else could I try?Leave a comment:
-
MS Access email clients
Can anybody tell me how to include my email addresses from a query to the bcc field of a new email.
I created a query to select my email addresses, I tryied using the VBA code below to extract the email addresses and insert them in a SendObject command, but nothing happens. Please Help.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim rcpts As String
Set db = CurrentDb
Set rst...
No activity results to display
Show More
Leave a comment: