You will be able to.....
I only started with Access 3 months ago, but its great to pass on tips that others gave me.
~Phil4tektips~
Grant us peace in our days work!
With rst
'writes all the email addresses to a string
If ![email-mother] & "" <> "" Then
strEmail = strEmail & ![email-mother] & ";"
else
'Deal with blank email
End If
If ![email-father] & "" <> "" Then
strEmail = strEmail & ![email-father] & ";"
else
'Deal with blank...
Remou has solved it there....
Use this code then and it should deal with blanks!:
Private Sub email2_Click()
On Error GoTo Err_email2_Click
Dim dbs As DAO.Database, rst As DAO.Recordset
Dim strEmail As String
Dim strDate As String
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Members")...
Because if you leave a blank the string becomes something like:
zzz@xxx.co.uk; ccc@hhj.co.uk; ;fff@ggg.co.uk;
Its the double semi-colon in the middle of the string that is causing the error failure I believe. I got the same error by deleting an email addy from one of my lists. So just make...
Ok ..... I kind of just realised.....
If you have any blank fields the string will become corrupted.
You need to make sure that every cell has an email address in.
So if you populated "email" with your email address throughout all the records this strEmail would work.
~Phil4tektips~
Grant us...
try changing:
strEmail = strEmail & ![email] & ";"
to:
strEmail = "xxxx@zzzz.co.uk"
Put your email address in for the "xxxx@zzzz.co.uk"....test to see if that works first. I think its a problem with the string. Have you only got one email address in that field at the moment? If so trying...
Private Sub email2_Click()
On Error GoTo Err_email2_Click
Dim dbs As DAO.Database, rst As DAO.Recordset
Dim strEmail As String
Dim strDate As String
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Members")
strDate = Date
With rst
'writes all the email addresses to a string
While Not...
Remou is right there.
What you need to do is simple. In your database, press ALT+F11 to bring up the VB code. When in the VB window click Tools then References.
Select (tickbox) Microsoft DAO 3.x Object Library and Click OK.
The error isnt to do with anything you've done wrong its just not...
I've solved it (yay!!) with:
Private Sub Counter()
Dim dbs As DAO.Database, rst3 As DAO.Recordset, rst4 As DAO.Recordset
Set dbs = CurrentDb()
Set rst3 = dbs.OpenRecordset("Number of Users Opens")
Set rst4 = dbs.OpenRecordset("Number of Opens")
If (rst3.BOF = True) Then
[PersonalOpenCounter] =...
The error that comes up is due to the RecordSet being empty and highlights this line of code:
If (![Count] = Null) Then
thanks,
~Phil4tektips~
Grant us peace in our days work!
The code below displays the number of items that a user has open in the database on the front screen when they login.
I pick up their username on form open, and use it in a query to find the number of their items. The following code is a subroutine that is called to write to a couple of text...
I have the following code. Which will email out when a record is overdue. It works at the moment if the record is 3 days overdue...hence the If statement:
If (![Days Overdue] = 3) Then
Ideally the condition should be a range of 1-14. I've tried but I cant get the syntax right?! Any help...
Re: "To my understanding replicating was designed for data"
Who was it who said you need to understand to be understood?
My apologies, my information came from previous posts.
The point Trevil has made though is right, your 'environment' will quite often determine your means of deployment...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.