For anyone looking at this code I commented out the attachment part as I don't need it.
Private Sub btnNotify_Click()
Dim mess_body As String
Dim rst As DAO.Recordset
Dim appOutLook As Object
Dim MailOutLook As Object
Set appOutLook = CreateObject("Outlook.Application")...
Sending email using VBA code - RESOLVED
I wish to send one email to txtFillOutBy via her txtEmail using Outlook.
Can anyone let me know if this will work in 2007? Current errors are undefined datatypes and data member not found. They're in red.
This is the third block of code I've found on...
I understand that Me refers to the form/report.
I am using it within a With statement. I was hoping that I could access multiple fields using 1 variable within a loop. Since this ability is restricted to controls I've modified my tables and changed the subform to have unbound textboxes...
' I can use a dynamic variable like this:
Dim dayfield as String, dReportCurrentDate as date, counter as integer
dReportCurrentDate = Now()
For counter = 0 To 30
dayfield = "txtDay" & Format(counter, "00")
Me(dayfield).ControlTipText = ""
Me(dayfield).BackColor = lngRed ' Out on...
Run-time error '3265':
Item not found in this collection.
The error occurs where the :confused: is.
!Me(EarnedField) = myEarnedCredits
This table tblVacationLog consist of:
ID
SIN
vacationYear
vacationBalanceCarryOver
vacationCreditsEarned01 - 12
vacationCreditsUsed01 - 12
The last two...
Each record consist of 12 entries for CreditsEarned and CreditsUsed. I have less than a week to wrap everything up so I may remove the loop and hardcode the loop for each month.
I can use Me.Variable to access an object but I'm unable to find the proper syntax for it to reference a field of a...
I get an error on line :confused:. I have an array of variables in my table and access them using the for loop, see :rolleyes:. It does not seem to be working at the moment. The online example I used wasn't doing the same thing. Am I not accessing it correctly?
Private Sub btnBuild_Click()
Dim...
I get run-time error '2465': Application can't find the field 'Me' referred to in your expression. I removed the Me and it works. Thanks for the help.
Private Sub btnFetchInfo_Click()
Me.txtSIN = Me.frmEmployeesPermanent.Form!txtSIN
End Sub
I'm unable to Google an answer to this question.
I have a form with a subform. I wish to use this subform by multiple forms. I want a textbox to equal a textbox from the subform. On a button click event I wish to move the value. This is what I found so far.
Private Sub...
I just got this error. Gotta say I'm not a fan of this. There's gotta be a better way to handle orphan code.
I deleted an old splashscreen that had 2 lines of code in it. Now I've lost a days work. This is not right. :mad: