Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help using the SetValue macro

Status
Not open for further replies.

bhunter

Programmer
Jul 27, 2000
36
US
I am trying to take a value from an unbound text box on a form and store it in a table.&nbsp;&nbsp;I tried to do this with the SetValue macro, but I can't make it work.&nbsp;&nbsp;When I try to run the macro, I get an error message saying that the database couldn't find the table that I used in the expression.&nbsp;&nbsp;I am using the expression builder to create the syntax for accessing the field in the table and I don't see any problems with the syntax: [Test Procedure Information Table]![Overall Result]<br><br>I want to be able to set the value for the field &quot;Overall Result&quot; in the &quot;Test Procedure Information Table.&quot;&nbsp;&nbsp;Can anyone tell me how to set this value using the SetValue macro?
 
Thanks for the response.&nbsp;&nbsp;I performed a selectobject on the table that I want to add records to before doing the setvalue, but I'm still getting the error message.&nbsp;&nbsp;It is the same message that I mentioned before:&nbsp;&nbsp;The database can't find the table you entered in the expression.&nbsp;&nbsp;I also did an opentable before selectobject and setvalue.&nbsp;&nbsp;Is there something else major that I'm doing wrong??
 
I just wanted to also add that I have been able to make setvalue work with a control but not with a field in a table.&nbsp;&nbsp;If someone could give me an example of how they have set a value for a field in a table that would be great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top