Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WITH with a Variable (A2K)

    The following code snippet (1) works OK, but I wondered if I could improve it as shown in Snippet (2) by substituting the property

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WITH with a Variable (A2K)

    I think the code should be:
    Snippet (2)

    Private Sub cmdSeeDataSht_Click()
    On Error GoTo Err_cmdSeeDataSht_Click

    Dim varFormName As String
    Let varFormName = "frmJobs"

    DoCmd.OpenForm varFormName, acFormDS

    With Forms(VarFormName)
    .AllowAdditions = False
    .AllowEdits = False
    Francois

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WITH with a Variable (A2K)

    Works a treat, Thanks Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •