I have a button setup to email a Proposal Report to specific people. Works fine. I now need the ability to email the Proposal Report (without an addendum) OR email the Proposal Report with an addendum. There are additional fields on the report with an addendum. I have tried the on format event of the Proposal Report to make the addendum fields invisible using this if statement:
Code: if Forms![CurrentJobs]![Addendums].Form![AddendumNum] Is Null Then Me.AddendumNum.Visible = False Me.Label324.Visible = False Me.Label325.Visible = False Me.AddendumDrawings.Visible = False Me.AddendumDrawingsDate.Visible = False Me.Label326.Visible = False Me.AddendumFloors.Visible = False Me.Label327.Visible = False End If
But I keep getting an "object required" error. how I can run the Proposal Report with or without addendum information depending on the job?
Not really sure how to word this as I'm not sure if I even understand. Basically I have been asked to set up a database logging distubances and need to display on the form 3 different dates (action by, monitoring period and date to close case) from the date the data is entered, depending on the disturbance chosen.
So if there was noise nuisance the action date would be 7 days, the monitoring period would be 14 days and the closing date would be 90 days. This would be different from, say dog fouling. When the user chooses the disturbance from the combo box I need the dates to reflect the deadlines for that disturbance.
I have entered the number of days to add onto the table containing the disturbances (ie 7, 14 etc) and know how to add these days onto the original date.
How do I make this happen depending on the disturbance selecting.:confused:
What i need:I have the attached database which includes 2 tables (Table1 and Table2) which are related One-2-Many (Table1 is the One and Table2 the Many)There is one form also with the name "Form1" which includes 11 unbound (ctr1,2,3...11) and are calculated with the values of fields [MainDate] , [Days] and [EndDays]
The Issue: As you can see in the attached sample, on Table1 i can assign the "MainDate" value , the "Days" and on field "EndDays" i can have the value of the [MainDate]+[Days].
I need to update the field "RefNo" on Table1 on depending the date range of the field [EndDays] and the controls [ctr1-11]. Specifically i need : If the Date() is in the range of eg. [EndDate] and [ctr1] i need to have the value of the first record of the Table2 (RefNo) on field "RefNo" into Table1. If the Date() is the range of [EndDate] and [ctr2] i need the second record values of the field [RefNo] into Table2 and so over..
I have a form which has a button to email the data out in a standard email message.
Private Sub Command60_Click() Dim MyDb As dao.Database Dim rsEmail As dao.Recordset Dim sToName As String Dim sSubject As String Dim sMessageBody As String
[code]...
This works well enough, however, FIELDS 11 through to 16 contain the venue address. This is all we ll and good if every field of the venue address is populated. here are times when not all of the fields are populated, for instance, the address might only be 5 lines.I know I can do this using IIf statements on a report, but how can i achieve the same thing for the email.
I have made a query with the name "Confirmation" and it is setup like this:
Name trainee Email Training John John@mail.com Tr one Mary Mary@mail.com Tr two
I also made a button in a report with the title "Send Mail" now is my goal that if i press that button automatically multiple e-mail message's will be generated with data from people in that query. So if click on that "Send Email" button i want two different mails messages generated that will be send to John@mail.com and Mary@mail.com with in the mail body their data.
I am currently using vb code to send an email in Access on the click of a button. I want the database user to be able to enter the recipient in a text box [ToEmail] which is on form [GroupStockProfiler]. However, I'm unsure how to put this into my code. I currently have the following which doesn't work (unless I put a specific email after 'To'):
I have an automated email system (Lotus Notes) in a Access database I have created and am looking for the code needed to add up to 3 c.c addresses into an email prior to sending automatically.
The code I have to send the email to the To: individual is all working but what code I need to add and where for the c.c addresses of which there could be 1, 2 or 3. The control for To address is EmailTo = CustCopyEmail The controls for the 3 c.c emails are cc_EmailAddress, cc_EmailAddress1 and cc_EmailAddress2.
Here's the code I have:
Private Sub SEND_CC_Click() ' Set up the objects required for Automation into Lotus Notes. Dim Maildb As Object 'The mail database. Dim Session As Object 'The Lotus Notes session. Dim MailDoc As Object 'The mail document itself. Dim UserName As String 'The current users Lotus Notes name.
right I have auditing system in my database that tracks any changes made to any records. it logs it on a separate table and i show it on a continuous form.
right my problem is that I have loads of check boxes and text boxes on my main form on the form that records the main form I have a field call "new value" this is a text box but if I change a checkbox on the main form it will show -1 or 0 in the new value field on the recording form but I would like it to say yes or no I have tried the following
Code:
Private Sub New_Value_AfterUpdate() If [New_Value].Value = -1 Then [New_Value].Value = "yes" End If End Sub
this only works if I enter -1 manually but the data is entered automatically after the record is saved on the main form ...
I have also tried on enter before update I get error but now I need it to change on new entry...
I'm after a piece of code which works as described below.
I have a save button on a form
I have a append query ready to run.
When the save button is clicked, I want the code to see if a checkbox is true or not and if its true I want the append query to run if its not then I want the form to save and nothing else.
I have a table (tbloutput) which has details of customers and which staff they have been contacted by.
What i want to do is, export the details from this table into an excel sheet using a template that i have set.
What i want to do is create multiple excel outputs using this template depending on the name of the staff. So each staff will have a seperate workbook which was created using that template. And i also want the new workbook to be named for that staff member.
So in short
Table exported to excel workbook and excel workbook named : Blabla staffname.xlsm
I created a form that applies conditional formats depending on a field. It works fine, until you enter data into one of the conditionally formatted fields, then all hell breaks loose. Conditional formats totally go away and the cells go to #error.
I want to display the text from one combo in a text box in another form based on what's selected in a second combo box. The text box is in a different form from the combo boxes.
Sub D_ComponentTypeCmb_Change()
If Me.D_ComponentNameCmb.Value = "Customise" Then Forms!CustomComponentF!C_ComponentTxt.Value = Me.D_ComponentTypeCmb Else Forms!CustomComponentF!C_ComponentTxt.Value = "" End If End Sub
I have a form wich includes listbox of employees. When I click on them, it shows his or her data (date of birth,address,etc...). For every employee there are also three diferent checkboxes - if he is regularly employed, temporaly employed or student.So now what I need is to filter listbox of employees - only student or only regular or only temporar or all.I was wondering if I can do that with combobox, but I really dont know how. I am prety new to VBA.
I have 2 fields on my form service interval combo box and vehicle mileage text box I m trying to create a pop up message on there values
if service interval is 12,000 and the mileage entered in the vehicle mileage is over 12,000 then show pop up message.
this works but I'm sure its wrong don't no why I need the -1 anyways here's what I have
Code: If Me.Vehicle_Mileage.Value > Me.Cboserviceinterval.Column(1) - 1 Then msgbox "test" end if
Now my problem what I can't get it to work . I still want the pop up message, if say the service interval is 12,000 and mileage entered in the vehicle mileage is 1,000 miles below the service interval I still want the same pop message but if 2,000 or more below service interval then no pop up message .
I have tried a number of sequences with no avail....
I have a combo box with three columns, the first one is the bound one, the second is text in English, and the third is text in Spanish. Currently when the form is open, both the English and Spanish texts columns are visible. What I would like to do is set up a command button on a different form that will open the form with just the English showing in the combo boxes, and another button for Spanish. I've tried the following code which opens the form, but the combo box is disabled altogether.
i have the following code that hides 5 buttons depending if the user has permission which works fine.im trying to incorporate an IF statement if there is only 1 of the buttons visible then to automatically click the button. but if there is more than 1 do noting?
Code:
Private Sub Form_Open(Cancel As Integer) Dim rsO As DAO.Recordset Set rsO = CurrentDb.OpenRecordset("SELECT tblUserPermission.UserFK, tblUserPermission.CompanyFK, tblUserPermission.Permission " & _ "FROM tblUserPermission INNER JOIN tblUser ON tblUserPermission.UserFK = tblUser.UserPK " & _ "WHERE Username = '" & Me.txtName.Value & "'")
At this point, FE db has 4 linked tables, 3 are located in FileBE1, and the 4th is located in FileBE2.
The production BE is located on a server, the test (when working remotely) is on a local computer that is not able to connect to the server. Also, the test BE files (but not the table names) have different names than the production.
I have the idea of creating a table in the Front End that contains a list of users, filename and location (server or local drive).
Upon startup, how could I set up the vba to check the links and if they need to be changed will go and change them without the user having to click on link table manager or be prompted for names and path.
For now, I envision three rows in the table, one for the test user, one for local user and a default UNC for everyone else. (or would it be six rows since there are two files that need link checking and relinking).
I'm not sure if I am biting off more than I can chew. I have a text field in each record in my database (Inherited) The db has nearly 5,000 records. I would like to split the field into records in a seperate table. An Example of the table as is now;
Is this possible in one hit or do I need to process the records without dates first and then run another process to split those with Dates? I say dates but the field is a text field. About 15-20% of the records contain dates which are always enclosed in parenthesis.
Sending email using VBA & HTML. I want send email from access. Message in body contains some text and table in HTML format. I need check if email was really sent or cancelled with user.
Code: Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) With objMail 'Set body format to HTML
[Code] ...
I need some message (for example):
If error then MsgBox "Email not sent" Else MsgBox "Email sent" End If
I have created something from our transport department and need to set up so he can select a command button and email from a query, but where would I put the query details in the coding below
VBA used
Dim strSQL Dim db As DAO.Database Dim MailList As DAO.Recordset Dim objOutlook As Outlook.Application Dim objemail As Outlook.MailItem Dim Subjectline As String Dim BodyFile As String
I am having troubles adding email addresses to my CC box in my email. I am able to get the emails to populate into the "To:" space. Now I know I have the DLookup accessing the same record, but how can I make it so the CC_List puts the emails into the CC of the email?
Code: Dim DailyReport As Integer Dim EmailRecipiantsList As String Dim RecipiantName As String Dim CC_List As String
For MOST of the people who use the database, this works fine, and they send the email with the RTF attachment which all the recipients can open - but for some users, it generates a .tmp file which if you 'Open' it is just a load of gobbledegook, but it you 'View' it looks ok - but is truncating the report.what could be causing Access 2007 to create .tmp files rather than .rtf?
I have some code that will connect to a database and the analyst name from the table. the name is stored as "Peter Cetera" and it would need to change it to "Cetera, Peter", this way I can paste it inside outlook email (happens via vba).
I use the below code to catch the name from the database:
Code: Sub FindAnalystInDatabase() 'Declaring the necessary variables. Dim con As Object Dim rs As Object Dim AccessFile As String
[Code] ....
The first value returned is the BIN nr and the second is what is interesting form me.
I have the code for sending an email but I only want to send a single email when there are records in a query and only when the database is first opened.
I hadn't considered this in my design so what structural requirements would it require if any?