Eljefegeneo
Still trying to learn
- Local time
- Today, 05:49
- Joined
- Jan 10, 2011
- Messages
- 904
Cannot uncheck it. Says it is in use.
UpdateBackup:
Dim db As Database
Dim rs As Recordset
Dim BUB As String
Dim DBU As Date
Dim BUD As Boolean
***yes that is correct. .value works.
Then I'll bet all your money that this is a lookup field in the table, or perhaps a multi value field.yes that is correct. .value works.
Hi. Since we cannot watch what you're doing, I just want to confirm. You only took out the one I asked you to uncheck, correct? In any case, you just need to go through each error and fix them one at a time until they're all gone. Once you've fixed all of the errors, then your code should now be late bound (at least for Outlook).Unchedkced the reference and the first one that came up was:
this is some code that sets up an automatic backup for the DB on opening.Code:UpdateBackup: Dim db As Database Dim rs As Recordset Dim BUB As String Dim DBU As Date Dim BUD As Boolean
the Dim db as Database throws the first error message.
Will start work on this tomorrow. After I correct the all, do I check that reference on again?
Dim db As Object
Set db = CreateObject("Access.Application")
Dim rs As Object
Set rs = CreateObject("ADODB.recordset")
Hi. The first one is only necessary if you're automating an external Access file. But the second one is not necessary and probably incorrect. What do you use them for?Will leave it unchecked as you said.
I now have the following which does not throw any error when compiling. Want to make sure I have this correct.
Not sure about either and before I go through the entire DB thought I would ask.Code:Dim db As Object Set db = CreateObject("Access.Application") Dim rs As Object Set rs = CreateObject("ADODB.recordset")
Hi. If you move your existing db to 2019, you won't have this problem anymore, until version 2020 comes out.I was going through the errors and whenever one occurred, changed them to the one above. I now realize that I should have been checking each and every one to see if it worked before proceeding with the next. I regret to say that my old DB has so many of these errors that I am disheartened that Microsoft has chosen to penalize a long time user with the problem that I have encountered.
In any case, I will start again, deleting the reference to Outlook as was suggested and then start the process anew. Quite a bit of my code was found on this forum for which I was eternally grateful since it simplified my learning process. It is almost as if I am starting out all over again.
Just a quick question. Is it better to correct the old DB or try to just move it all to Access 2019 or would I still have the same problems?
Hi. Basically, the problem with early binding is using an "old" version to talk to a "newer" version. Early binding has no problem when a "new"version tries to talk to an "older" version.The users at work are going to install Office 365 instead of the stand alone versions of Office. So if I can get Access 2019 to work or get my old Access 2010, do you meant that with the next update of Office 365 the problem might occur again?
If I understand it correctly, the problem occurs when I tried to use Access 2010 on a new Windows 10 machine that has Office 365 on it. Access 2010 with its early binding code is not compatible with Office 365 components, i.e. Outlook, Excel, Word, etc.
Another alternative is to get rid of Office 365, install the old copy of Office 2010 and not get any security updates from Microsoft, leaving us vulnerable to hacking. Not a good idea?
Dim olApp As Object
Dim mItem As Object
Set olApp = CreateObject("Outlook.Application")
Set mItem = olApp.CreateItem(0)
If Me.AttachFile = "" Or IsNull(Me.AttachFile) Then
With mItem
.To = CStr(Me.To)
.CC = CStr(CC2)
.BCC = CStr(BCC2)
.Subject = CStr(Me.SubjectLine)
.Body = CStr(Me.MessageBody)
.Display ' To show the email message to the user
End With
Else
' Add the To/Subject/Body to the message and display the message
With mItem
.To = CStr(Me.To)
.CC = CStr(CC2)
.BCC = CStr(BCC2)
.Subject = CStr(Me.SubjectLine)
.Body = CStr(Me.MessageBody)
.Attachments.Add (Me.AttachFile)
.Display ' To show the email message to the user
End With
End If
' Release all object variables
Set mItem = Nothing
Set olApp = Nothing
MsWord.Olb Version 8.5 missing
Hi. Your sample DB code has nothing to do with other Office products, so try unchecking the reference to the Office 14.0 Library just to see if it will make any difference.I decided to make a sample DB with my mail app which was the primary cause of the failure.
The DB still throws off an error message on open similar to the first one but now:Code:Dim olApp As Object Dim mItem As Object Set olApp = CreateObject("Outlook.Application") Set mItem = olApp.CreateItem(0) If Me.AttachFile = "" Or IsNull(Me.AttachFile) Then With mItem .To = CStr(Me.To) .CC = CStr(CC2) .BCC = CStr(BCC2) .Subject = CStr(Me.SubjectLine) .Body = CStr(Me.MessageBody) .Display ' To show the email message to the user End With Else ' Add the To/Subject/Body to the message and display the message With mItem .To = CStr(Me.To) .CC = CStr(CC2) .BCC = CStr(BCC2) .Subject = CStr(Me.SubjectLine) .Body = CStr(Me.MessageBody) .Attachments.Add (Me.AttachFile) .Display ' To show the email message to the user End With End If ' Release all object variables Set mItem = Nothing Set olApp = Nothing
When OK is clicked I get the get the Run Time Error and then when I click debug get the compile error.Code:MsWord.Olb Version 8.5 missing
A snaps of all this is attached as well as the references.
This all comes from the machine running Windows 10 Office 365.