Results 1 to 2 of 2

Thread: OpenArgs

  1. #1
    Join Date
    Mar 2004
    Posts
    139

    Unanswered: OpenArgs

    I'm have a continous for with a "new" button that opens another form. This new form has 2 controls that I would like to populate with information from the previous form. I was looking at the openargs function but tried the following on a lark and it worked perfectly.

    Private Sub cmd_New_Click()

    Dim strAccount As String
    Dim strCustomerName As String

    DoCmd.OpenForm ("frmChecklist")

    Forms!frmChecklist!txtAccount = strAccount

    Forms!frmChecklist!txtCustomerName = strCustomerName

    End Sub

    I didn't include the process by which the variables were assigned but this method seemed to work.

    So I'm thinking why send two variables across in one string with open args and parse the variables apart when the above seems to work? Is there any disadvantage?
    Thanks,
    Bill

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    about the only Disadvantage is

    in the form you are opening you will have to have code to check the OpenArgs and do something with it.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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