#Name? in text box where default is Date()
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
#Name? in text box where default is Date()
What reference do i need for the Date()?
Last edited by Pat on 07 Nov 2011, 07:21, edited 1 time in total.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Date? in text box where default is Date()
Yes i do mean #Name?.
Another piece of information here is that the database is an MDE where there is no source MDB.
Another piece of information here is that the database is an MDE where there is no source MDB.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #Date? in text box where default is Date()
Date() is a standard function from the Visual Basic for Applications library. This library is always available. If it is not recognized, thus usually means that another reference is missing. However, there is no way to set or clear references in an .mde database, so I fear you're out of luck.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Date? in text box where default is Date()
I thought so, my only hope is to make sure all the dll's and ocx's are present, so i am flying blind in this.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #Date? in text box where default is Date()
You can only find out by trial and error...
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Date? in text box where default is Date()
So true, wish me luck as you wave me ......
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Date? in text box where default is Date()
I have the following code that partly works:
It crashes on the pointed to line with "Method 'name' of object 'Reference' failed"
Is there another approach i can adopt here?
Code: Select all
Private Sub CommandTest_Click()
Dim strDB As String
Dim appAccess As Object
' Initialize string to database path.
Const strConPathToSamples = "C:\Data\TR corp\Accounting2000\"
strDB = strConPathToSamples & "Accounting2000Interface.mde"
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
Dim intRef As Integer
Dim strMsg As String
If appAccess.References.Count = 0 Then
MsgBox "ZERO references found...", vbInformation, "No References"
Else
Debug.Print "No of refs is " & appAccess.References.Count
strMsg = ""
For intRef = 1 To appAccess.References.Count
strMsg = strMsg & appAccess.References(intRef).Name & ": " <<<<<<<<<<<<<<<<<
strMsg = strMsg & appAccess.References(intRef).FullPath & vbCrLf
Next
End If
Debug.Print strMsg
MsgBox "all done" & vbCrLf & strMsg
End Sub
Is there another approach i can adopt here?
You do not have the required permissions to view the files attached to this post.
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Date? in text box where default is Date()
Is there any way to translate the Guid, Major and Minor properties into the Filename and path, or even just filename?
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #Date? in text box where default is Date()
I don't think you can view the references in an .mde/.accde database.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Name? in text box where default is Date()
You are right, but what i have got is a database A that can read and display the references in another database that is a MDE database.
My only problem is it won't show me what the MISSING reference filenames are.
My only problem is it won't show me what the MISSING reference filenames are.
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #Name? in text box where default is Date()
I don't have a .mde database to test. With a .accde, your code returns the names and paths of all references.
If you wish, you can delete all objects from your .mde and attach it (zipped).
If you wish, you can delete all objects from your .mde and attach it (zipped).
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #Name? in text box where default is Date()
Why i am doing this is so the client can move the app to another server.
It seems i have found out why the 'Name' was incorrect.
I ran my code against the mde that works in the online environment. I ran it and captured the online references in a table, i then ran it on the server where the user wants it put and captured those references in another table, then compared the 2 tables.
The problem turned out to be a Unbroken reference that was NOT registered.
Thanks for your advice and interest Hans
It seems i have found out why the 'Name' was incorrect.
I ran my code against the mde that works in the online environment. I ran it and captured the online references in a table, i then ran it on the server where the user wants it put and captured those references in another table, then compared the 2 tables.
The problem turned out to be a Unbroken reference that was NOT registered.
Thanks for your advice and interest Hans
-
- Administrator
- Posts: 78535
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands