I'll try this, but to add to this issue...
If I have a hidden text box such as an ID number and I try to pass the value
to another form, I get errors as well if it's hidden but it works great if
it is not hidden. But, it is not just that simple. If I unhide the text
box and then rehide it, it will see the value and pass the value.
So, in this case, I don't think using .Modified=True will solve the problem.
It just seems to me that if an item is hidden, VB doesn't "see" it.
The sample was sent again to the correct email.
--
Brian P. Hammer
I found this looking for another answer this morning but it may be what is
going on in your case as well...
Try setting Textbox1.Modified=True after setting the contents... Look at the
documentation for Modified in the Help files (TextBoxBase.Modified Property)
where it says:
You can use this property to determine if the user has modified the contents
of the text box control. You can also set this property in code to indicate
that changes were made to the
text box control by the application. This property can be used by validation
and data-saving methods to determine if changes were made in a text box
control so the changed
contents can be validated or saved.
Very similar to the DataChanged property in VB6
Basically, after setting teh contents of the textboxes from code, set teh
modiied property to true. This does not get set unless you TYPE into the
text box... Please let me know if this
is the answer for you as I would like to know this for future reference<G>
Want to know more? Check out the MSDN Library at
http://msdn.microsoft.com
or the Microsoft Knowledge Base at
http://support.microsoft.com
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------