I dont know why but my last post was not posted in correct order, pls read
this one instead
Sorry, for the confusion. This is an example of what i'm trying to do, if
you
can help me with this example then I can apply it to my project.
I have created a form with a ListBox1 a TextBox1 and a CommandButton1
My code for this was:
sub CommandButton1_Click()
Set ListBox1V =
Item.GetInspector.ModifiedFormPages("Message").Controls("ListBox1")
Set TextBoxV =
Item.GetInspector.ModifiedFormPages("Message").Controls("TextBox1")
ListBox1v.AddItem TextBoxV
End sub
--
Then when i sent the form, the reciption didn't see any of the info that was
added to the ListBox1, I read a few site and they advised that controls don't
keep the info when being sent. Instead, you must use "userdefined fields".
I then when to the properties of the objects on the form and under value,
added userdefined fields, and changed the coding to:
sub CommandButton1_Click()
Set ListBox1V = Item.UserProperties("ListBox1")
Set TextBoxV = Item.UserProperties("TextBox1")
ListBox1v.AddItem TextBoxV
End Sub
However, nothing happens. What am i doing wrong?
"Mr. GetRight" wrote:
> Sorry, for the confusion. This is an example of what i'm trying to do, if you
> can help me with this example then I can apply it to my project.
> I have created a form with a ListBox1 a TextBox1 and a CommandButton1
> My code for this was:
> sub CommandButton1_Click()
> Set ListBox1V = Item.UserProperties("ListBox1")
> Set TextBoxV = Item.UserProperties("TextBox1")
> ListBox1v.AddItem TextBoxV
> End Sub
> However, nothing happens. What am i doing wrong?
> sub CommandButton1_Click()
> Set ListBox1V =
> Item.GetInspector.ModifiedFormPages("Message").Controls("ListBox1")
> Set TextBoxV =
> Item.GetInspector.ModifiedFormPages("Message").Controls("TextBox1")
> ListBox1v.AddItem TextBoxV
> End Sub
> Then when i sent the form, the reciption didn't see any of the info that was
> added to the ListBox1, I read a few site and they advised that controls don't
> keep the info when being sent. Instead, you must use "userdefined fields".
> I then when to the properties of the objects on the form and under value,
> added userdefined fields, and changed the coding to:
> "Sue Mosher [MVP]" wrote:
>
> > What do you mean by "adding data through" the list box and "make listbox
> > only text"?
> > Before you go too far down this road, you might want to make sure you can
> > meet the prerequisites for custom message forms:
> > http://www.outlookcode.com/article.aspx?id=61
> > > > Sue Mosher
> > > > > > > > "Mr. GetRight" <MrGetRight> wrote in message
> > news:E20C38BD-815D-4BB2-8632-5DEA6FC30133@microsoft.com...
> > > Ok, I figured out how to access the text box. NOW, I need to know how to
> > > create user defined list box. My form has 4 list box that the user will be
> > > adding data through and when they email it i want those fields to remain
> > > on
> > > the form, but as it is right now, i dont seem to know how to make listbox
> > > only text...
> > > > sub CommandButton1_Click()
> > > Item.UserProperties("TextBox1") = "It Works"
> > > End Sub
> > > > "Mr. GetRight" wrote:
> > > >> Hey, need help understanding how to do user defined fields.
> > >> I have created a from, and wrote the code, it workes just like i wanted
> > >> it
> > >> with one expection. When you send the form it doesn't keep the data in
> > >> the
> > >> fields. I found out that i have to make user defined fields.
> > >> However when i made the fields i am having trouble accessing the fields
> > >> with
> > >> my code now. I have read diff sites and microsoft and they say i should
> > >> be
> > >> ref to fields as:
> > >> Item.UserProperties.Find("TextBox1")
> > >> Can someone show me now to access userdifined fields using just a command
> > >> box and text box? Also, anywhere i can go to read more about it.
> > >> Thanks,
> > .
> >