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, 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 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 (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar