Selasa, 21 Februari 2017

[MS_AccessPros] How to call this function from forms.

 

Dear All,

I got this code below from a website. Can anybody give me an example on how to call this function from forms. Thanks in advance.

Option Compare Database Option Explicit Public bolLinkSubForm As Boolean 'Global durch Public ersetzt by Willi Wipp ' Author : Christian Coppes ' Version: V1.3 ' Last Modified: 29.06.2007 ' ' Update link to a subform (name in "strSubform") ' strChild and strMaster = Indices which should be linked ' between main form and subform. ' Name of the subform and name of the subform-container must be identical, ' if strSubForm is left Public Sub linkSubForm(frm As Form, strSubFormContainer As String, _ strChild As String, strMaster As String, _ Optional strRecSource As String, _ Optional strSubForm As String) On Error GoTo Fehler bolLinkSubForm = True Application.Echo False If strSubForm = "" Then strSubForm = strSubFormContainer ' necessary following MS-instructions frm(strSubFormContainer).LinkChildFields = "" ' necessary following MS-instructions frm(strSubFormContainer).LinkMasterFields = "" frm(strSubFormContainer).SourceObject = strSubForm If (strChild <> "" And strMaster <> "") Then frm(strSubFormContainer).LinkChildFields = strChild frm(strSubFormContainer).LinkMasterFields = strMaster End If If strRecSource <> "" Then frm(strSubFormContainer).Form.RecordSource = strRecSource End If Application.Echo True bolLinkSubForm = False Exit Sub Fehler: Application.Echo True Select Case Err.Number Case Else MsgBox "Error in linkSubForm: " & vbCr & Err.Description & vbCr & _ " Number: " & Str(Err.Number) Resume Next End Select End Sub

Best Regards,
Kevin


qingqinga@yahoo.com

__._,_.___

Posted by: "qingqinga@yahoo.com" <qingqinga@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar