Selasa, 11 Maret 2014

Re: [MS_AccessPros] VBA to Macro?

 

What happened to the VBA Functionality? that would be scarry
 
Jim Wagner



On Tuesday, March 11, 2014 2:17 PM, "jpjones23@centurylink.net" <jpjones23@centurylink.net> wrote:
 
Toukey,

Depending on the requirements, were I to have a need to fiddle with an mde file when I didn't have its source, I'd first look at pulling the needed data into Excel where it could be manipulated at will.  Then, once done, Excel ought to be able to update or add rows to tables in the mde file since data manipulation is readily permitted. 

There's no reason why Excel can't throw up forms that are populated via the Access mde file.  This isn't hard, once done.  I frequently do it for clients when they want Excel's greater data analysis capabilities for their Access data.

Jeff


From: "toukey1" <no_reply@yahoogroups.com>
To: "MS Access Professionals" <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, March 11, 2014 5:06:47 PM
Subject: Re: [MS_AccessPros] VBA to Macro?

 
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, 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 String
Dim fn As String
Dim lsname As String
Dim dobth As Date
Dim varx As String
Dim mes As String
Dim nam2 As String
 
 
dobth = Me!DOB
varx = Format(dobth, "dd-mmm-yy")
lsname = Me!Lname
nam2 = " 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)) Then
mes = MsgBox("Possible duplicate Applicant", vbOKOnly)
 
End If
End Sub
 
Thanks
Toukey




__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
.

__,_._,___

Tidak ada komentar:

Posting Komentar