Form Syntax errors

Enviva

Registered User.
Local time
Today, 17:12
Joined
Sep 24, 2005
Messages
37
Hi All,

I seem to have the biggest problem with getting information from one window/form to another.
I have a MainForm, that has 2 subforms on it. On the subform2 there is a command button that opens a new “Form3” in “dialog”. Form3 has a list box displaying data from a table and a command button that says “Add to Subfom2”. I want to get the information from Form3 and update the unbound textbox on subform2.
I keep getting errors; “Field not found in….” I have tried:
Forms!MainForm!Subform2.Textbox = ListBox.Colunm(1)
Forms!MainForm!Subform2.Form!Textbox = ListBox.Colunm(1)
Forms!MainForm!Subform2!Textbox = ListBox.Colunm(1)
None seem to work, what am I doing wrong?
Can some on help me with this syntax.
Thanks Enviva
 
I think you need to tell it where the list box is... Maybe me!myListbox.column(1)
 
Ken,
Sorry, I just forgot to type that in: Here is my accual code:

Forms!ptChart!SubCurrent.Form!Assessment = me.ListDiag.Colunm(1)& ": "& me.listDiag.Colunm(2)
Again, I have tried:
Forms!ptChart!SubCurrent.Assessment
Forms!ptChart!SubCurrent!Assessment

Nothing works.. I keep getting the error "field (SubCurrent) not found in expression"

Thanks...
 
KenHigg said:
I think you need to tell it where the list box is... Maybe me!myListbox.column(1)


Code:
Forms!MainForm!Subform2.Textbox.[B]Value[/B] = ListBox.Colunm(1[B]).value[/B]
Forms!MainForm!Subform2.Form!Textbox[B].Value [/B]= ListBox.Colunm(1).[B]value[/B]
Forms!MainForm!Subform2!Textbox[B].Value [/B]= ListBox.Colunm(1).[B]value[/B]


Wouldn't she need to say .value.?? I'm half dead here so I may be incorrect, but perhaps in my sleep deprived state I could be correct. :confused: :o
 
Fixed it!!

Ok I went back into the mail form and check everything. I found That the Subform2 was named "Child10" and the Source Object was "SubCurrent"
When I changed the name to SubCurrent, the following code worked.

Forms!ptChart!SubCurrent.Form!Assessment = me.ListDiag.Colunm(1)& ": "& me.listDiag.Colunm(2)

Thank you all for your speedy repsonses...
Enviva
 

Users who are viewing this thread

Back
Top Bottom