Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    > > > > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page