Results 1 to 2 of 2
2002-11-20, 19:07 #1
- Join Date
- Mar 2001
- Thanked 0 Times in 0 Posts
Change field value after printing (Access 2000)
After printing a report, I need to change the value of a yes/no field (Completed) in a table to true. I'm using Access 2000 with Win2000. I've tried the following: In the report design view, properties, on close - used expression builder to say Completed=true. We've also used the code builder for the report onclose property to say table name.Completed=true.
Results we got were:
On the report design view expression builder, we get the error that the object doesn't contain the automation object.
In the code builder, we get a compile error.
Any help will be appreciated.
2002-11-20, 19:48 #2
- Join Date
- Dec 2001
- Melbourne, Australia
- Thanked 32 Times in 32 Posts
Re: Change field value after printing (Access 2000)
What you could do is put the following code into the OnClose event:
Dim strSQL as string
strSQL = "UPDATE Tablename SET Completed = True WHERE somecondition"
Substitute your tablename and somecondition.
Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>