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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Before_Update to check user and stored values

Status
Not open for further replies.

hapajapa0218

Technical User
Jul 5, 2003
3
US
I have a single form (say..aForm); there is a textbox on the form whose control source is a field called "txt_homePhone" from a table (say..bTable); say there is a SaveRecord cmd button too. What I would like to do is when the user changes the SSN value (of say 111-11-1111 to 222-22-2222), I would save the update to a .txt or .rtf file, then make the update. I thought that using this:

homePhone_BeforeUpdate(Cancel As Integer)

DoCmd.OutputTo acOutputDataAccessPage, txt_homephone, acFormatRTF, "a:Output.rtf", True

would do it, but I get a runtime error. Can anyone help, please? If you have any other suggestions of recording updates that would be helpful too.

Thanks.

 
This is because if you look at the parameter list, you are attempting to output a textbox (called txt_homephone on the current form) as a data access page.
If you use a data access page instead of the textbox or the form itself, then it should work without problem.
Note however that outputting it to a floppy disk (A:eek:utput.rtf) will cause problems if there is no disk in the drive, a disk is read only or you have a very modern machine with no floppy drive.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top