hmmm.......didn't think of that. Let me give it a try.
Thanks.
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Toukey-
First, create a new mdb and copy all the objects you can from the MDE. THEN you have access to VBA to put back your code.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Mar 11, 2014, at 10:06 PM, toukey1 <no_reply@yahoogroups.com> wrote:Hi John,
I thought that I would have access to VBA in an mde so I copied the code from another database and thought that I could use it. Is there a way to get a macro to do what the code is doing?
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :Toukey-If you inherited an mde, where did you get the code? You can't define a macro in an mde, either.Yes, it would be possible to convert to a macro, but why?John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)On Mar 11, 2014, at 9:39 PM, toukey1 <no_reply@yahoogroups.com> wrote:Is it possible to create a macro from the following VBA code? Inherited an .mde database and unable to use VBA.Private Sub DOB_AfterUpdate()
Dim ln As StringDim fn As StringDim lsname As StringDim dobth As DateDim varx As StringDim mes As StringDim nam2 As String
dobth = Me!DOBvarx = Format(dobth, "dd-mmm-yy")lsname = Me!Lnamenam2 = " And [fname] = '" & Me!Fname & "'"
ln = DLookup("[lname]", "Members", "[Members].[DOB] = # " & varx & " #")fn = DLookup("[fname]", "Members", "[Members].[DOB] = # " & varx & " #")
If Not IsNull(DLookup("[DOB]", "Members", "[Members].[DOB] = # " & varx & " #" _& " And [Lname] = '" & lsname & "'" & nam2)) Thenmes = MsgBox("Possible duplicate Applicant", vbOKOnly)
End IfEnd Sub
ThanksToukey
__._,_.___
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (8) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar