Welcome to SPN

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

Sign Up Now!

macro

Discussion in 'Information Technology' started by Levans digital, Jul 28, 2006.

Tags:
  1. Levans digital

    Levans digital
    Expand Collapse
    Guest

    Help!
    The below Macro works fine but I would like to accomplish 2 things:

    Action: Setvalue
    Item: [CargoTallyID]
    Expression: [Forms]![CargoTallyfrm].[CargotallyID]

    (1) How can this macro be written in VB?
    (2) The action Gets the CargoTallyID from the Main form
    [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    works, however this event occurs on the afterupdate event of the
    “Description†field in the subform. Can this be modified a bit so that if the
    “description†field is empty no cargotallyID is assigned?

    Please help
     
  2. Loading...

    Similar Threads Forum Date
    Microcosm and Macrocosm Gurmat Vichaar Mar 20, 2009
    Adobe Unruffled by Macromedia Restatement (AP) Interfaith Dialogues May 4, 2005
    Macromedia Flash animation and designing. Interfaith Dialogues Oct 21, 2004

  3. schasteen

    schasteen
    Expand Collapse
    Guest

    If not isnull(Me![Description]) then
    Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    end if

    This is assuming you are using the after update event of the decscription
    field in the subform.

    "Levans digital" wrote:

    > Help!
    > The below Macro works fine but I would like to accomplish 2 things:
    >
    > Action: Setvalue
    > Item: [CargoTallyID]
    > Expression: [Forms]![CargoTallyfrm].[CargotallyID]
    >
    > (1) How can this macro be written in VB?
    > (2) The action Gets the CargoTallyID from the Main form
    > [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    > works, however this event occurs on the afterupdate event of the
    > “Description†field in the subform. Can this be modified a bit so that if the
    > “description†field is empty no cargotallyID is assigned?
    >
    > Please help
    >
     
  4. Levans digital

    Levans digital
    Expand Collapse
    Guest

    Hi Schasteen,

    Thanks very much for your assistance. Your cod addresses part (1) In that I
    can now remove the macro.
    But Part (2) still does not occur. When the Description after update occurs
    I get the "CargoTallyID" but If the description is deleted and left blank the
    CargoTallyID still remains.

    What you think? Or Maybe I did not explain Clearly the first time??

    Help

    "schasteen" wrote:

    > If not isnull(Me![Description]) then
    > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > end if
    >
    > This is assuming you are using the after update event of the decscription
    > field in the subform.
    >
    > "Levans digital" wrote:
    >
    > > Help!
    > > The below Macro works fine but I would like to accomplish 2 things:
    > >
    > > Action: Setvalue
    > > Item: [CargoTallyID]
    > > Expression: [Forms]![CargoTallyfrm].[CargotallyID]
    > >
    > > (1) How can this macro be written in VB?
    > > (2) The action Gets the CargoTallyID from the Main form
    > > [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    > > works, however this event occurs on the afterupdate event of the
    > > “Description†field in the subform. Can this be modified a bit so that if the
    > > “description†field is empty no cargotallyID is assigned?
    > >
    > > Please help
    > >
     
  5. schasteen

    schasteen
    Expand Collapse
    Guest

    If not isnull(Me![Description]) then
    Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    Else
    Me![CargoTallyID] = null
    end if

    Hope this does what you want

    "Levans digital" wrote:

    > Hi Schasteen,
    >
    > Thanks very much for your assistance. Your cod addresses part (1) In that I
    > can now remove the macro.
    > But Part (2) still does not occur. When the Description after update occurs
    > I get the "CargoTallyID" but If the description is deleted and left blank the
    > CargoTallyID still remains.
    >
    > What you think? Or Maybe I did not explain Clearly the first time??
    >
    > Help
    >
    > "schasteen" wrote:
    >
    > > If not isnull(Me![Description]) then
    > > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > > end if
    > >
    > > This is assuming you are using the after update event of the decscription
    > > field in the subform.
    > >
    > > "Levans digital" wrote:
    > >
    > > > Help!
    > > > The below Macro works fine but I would like to accomplish 2 things:
    > > >
    > > > Action: Setvalue
    > > > Item: [CargoTallyID]
    > > > Expression: [Forms]![CargoTallyfrm].[CargotallyID]
    > > >
    > > > (1) How can this macro be written in VB?
    > > > (2) The action Gets the CargoTallyID from the Main form
    > > > [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    > > > works, however this event occurs on the afterupdate event of the
    > > > “Description†field in the subform. Can this be modified a bit so that if the
    > > > “description†field is empty no cargotallyID is assigned?
    > > >
    > > > Please help
    > > >
     
  6. Levans digital

    Levans digital
    Expand Collapse
    Guest

    code work perfectly thanks

    "schasteen" wrote:

    > If not isnull(Me![Description]) then
    > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > Else
    > Me![CargoTallyID] = null
    > end if
    >
    > Hope this does what you want
    >
    > "Levans digital" wrote:
    >
    > > Hi Schasteen,
    > >
    > > Thanks very much for your assistance. Your cod addresses part (1) In that I
    > > can now remove the macro.
    > > But Part (2) still does not occur. When the Description after update occurs
    > > I get the "CargoTallyID" but If the description is deleted and left blank the
    > > CargoTallyID still remains.
    > >
    > > What you think? Or Maybe I did not explain Clearly the first time??
    > >
    > > Help
    > >
    > > "schasteen" wrote:
    > >
    > > > If not isnull(Me![Description]) then
    > > > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > > > end if
    > > >
    > > > This is assuming you are using the after update event of the decscription
    > > > field in the subform.
    > > >
    > > > "Levans digital" wrote:
    > > >
    > > > > Help!
    > > > > The below Macro works fine but I would like to accomplish 2 things:
    > > > >
    > > > > Action: Setvalue
    > > > > Item: [CargoTallyID]
    > > > > Expression: [Forms]![CargoTallyfrm].[CargotallyID]
    > > > >
    > > > > (1) How can this macro be written in VB?
    > > > > (2) The action Gets the CargoTallyID from the Main form
    > > > > [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    > > > > works, however this event occurs on the afterupdate event of the
    > > > > “Description†field in the subform. Can this be modified a bit so that if the
    > > > > “description†field is empty no cargotallyID is assigned?
    > > > >
    > > > > Please help
    > > > >
     
  7. schasteen

    schasteen
    Expand Collapse
    Guest

    No problem

    "Levans digital" wrote:

    > code work perfectly thanks
    >
    > "schasteen" wrote:
    >
    > > If not isnull(Me![Description]) then
    > > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > > Else
    > > Me![CargoTallyID] = null
    > > end if
    > >
    > > Hope this does what you want
    > >
    > > "Levans digital" wrote:
    > >
    > > > Hi Schasteen,
    > > >
    > > > Thanks very much for your assistance. Your cod addresses part (1) In that I
    > > > can now remove the macro.
    > > > But Part (2) still does not occur. When the Description after update occurs
    > > > I get the "CargoTallyID" but If the description is deleted and left blank the
    > > > CargoTallyID still remains.
    > > >
    > > > What you think? Or Maybe I did not explain Clearly the first time??
    > > >
    > > > Help
    > > >
    > > > "schasteen" wrote:
    > > >
    > > > > If not isnull(Me![Description]) then
    > > > > Me![CargoTallyID] = [Forms]![CargoTallyfrm].[CargotallyID]
    > > > > end if
    > > > >
    > > > > This is assuming you are using the after update event of the decscription
    > > > > field in the subform.
    > > > >
    > > > > "Levans digital" wrote:
    > > > >
    > > > > > Help!
    > > > > > The below Macro works fine but I would like to accomplish 2 things:
    > > > > >
    > > > > > Action: Setvalue
    > > > > > Item: [CargoTallyID]
    > > > > > Expression: [Forms]![CargoTallyfrm].[CargotallyID]
    > > > > >
    > > > > > (1) How can this macro be written in VB?
    > > > > > (2) The action Gets the CargoTallyID from the Main form
    > > > > > [CargoTallyfrm] and assigns it to the CargoTallyID field of the subform, this
    > > > > > works, however this event occurs on the afterupdate event of the
    > > > > > “Description†field in the subform. Can this be modified a bit so that if the
    > > > > > “description†field is empty no cargotallyID is assigned?
    > > > > >
    > > > > > Please help
    > > > > >
     

Share This Page