What is the syntax to write code from a text box to a specific field in a table?
I have an access form with TextBox1. The user enters their name. Then, they click the command button at the bottom.
The vba code I have in the command button click event is as follows....
VB Code:
[tblInfo]![fldName] = [Forms]![frmMain]![TextBox1]
However, I get an error saying it can't find the field specified in my expression, but I do have the field listed and spelled correctly in the table.
Yes, I know it'd be easier to just Bind the textbox to the field and have it write directly to the field that way. But, my form is more complicated and that way will not work the way I have it set up which is why I am taking this round-about way. If you go some posts down on the list you can see that no one has responded to my other question which is why I am trying this method.




Reply With Quote