Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

auto fill

Discussion in 'Information Technology' started by Crystal via AccessMonster.com, Oct 27, 2005.

Tags:
  1. Crystal via AccessMonster.com

    Guest

    Hi,

    I'm trying to create a command button that you can click that will update
    delivery address2 with delivery address1, if delivery address2 isnull. I
    have tried iif statements, but would really like to see if I could get a VBA
    code for this, as I have a number of them.

    -Deliver to
    -Address1
    -City
    -Postal Code
    -Country.

    Can you help?

    Thank you, Crystal
     
  2. Loading...

    Similar Threads Forum Date
    Opinion Is Autocomplete Evil? Some Women Take A Hard Look at Google ! Breaking News Nov 7, 2013
    Sikh News AutoZone sued for firing Everett Sikh Breaking News Sep 29, 2010
    India Singh: Centre Ready To Give Kashmir Autonomy Breaking News Aug 11, 2010
    India Paste tariff cards behind driver’s seat: Transport dept to automen Breaking News Jul 21, 2010
    Gursharan Kaur: India's First Lady's Autobiography Sikh Personalities Jun 1, 2010

  3. JA Peachrose

    JA Peachrose
    Expand Collapse
    Guest

    if address 2 null then
    me.address1 = address2
    end if
    --
    JA Peachrose


    "Crystal via AccessMonster.com" wrote:

    > Hi,
    >
    > I'm trying to create a command button that you can click that will update
    > delivery address2 with delivery address1, if delivery address2 isnull. I
    > have tried iif statements, but would really like to see if I could get a VBA
    > code for this, as I have a number of them.
    >
    > -Deliver to
    > -Address1
    > -City
    > -Postal Code
    > -Country.
    >
    > Can you help?
    >
    > Thank you, Crystal
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 26 Oct 2005 19:10:18 GMT, "Crystal via AccessMonster.com"
    <u15223@uwe> wrote:

    >Hi,
    >
    >I'm trying to create a command button that you can click that will update
    >delivery address2 with delivery address1, if delivery address2 isnull. I
    >have tried iif statements, but would really like to see if I could get a VBA
    >code for this, as I have a number of them.
    >
    >-Deliver to
    >-Address1
    >-City
    >-Postal Code
    >-Country.
    >
    >Can you help?
    >
    >Thank you, Crystal


    Try something like:

    Private Sub cmdDupAddress_Click()
    If IsNull(Me!DeliverTo2) Then
    Me!DeliverTo2 = Me!DeliverTo1
    End If
    If IsNull(Me!Address2) Then
    Me!Address2 = Me!Address1
    End If
    <etc>
    End Sub

    John W. Vinson[MVP]
     

Share This Page