p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

vba_access thread: Help * Trying to automate the creation of objects


Message #1 by "John Anthony" <janthony@s...> on Fri, 15 Dec 2000 03:53:18 -0000
Hi John

Glad to here you have resolved your problems
You can off course close the editted form by code
See below for code. Remeber that the same code
approach will work with Reports


Public Sub ChangeRecordSource(strCount As String)
Dim f As Form
    DoCmd.OpenForm strCount, acDesign
     Set f = Forms(strCount)

      f.RecordSource = "code"
     Set f = Nothing
   ' this will prompt for closure you can however
optionally go acSaveYes
    DoCmd.Close acForm, strCount, acSaveYes
End Sub


Compliments of the Season to All


---
You are currently subscribed to vba_access as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-vba_access-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index