Audit Functions not working 
Author Message
 Audit Functions not working

I'm having trouble adding a new record to my subform.  I
get a "User defined type not defined" message and
highlights the first line of my code.  I don't know alot
about codes and modules, so any clues would be great.

Sub WriteAuditUpdate (txtTableName, lngRecordNum,
txtFieldName, OrgValue, CurValue)
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset ("AuditTable")



Sun, 26 Jun 2005 01:04:31 GMT  
 Audit Functions not working
Hi Kym,

I'm assuming you're using MS Access 2000 or later, and
that you don't have a reference to DAO (Access doesn't set
this by default). From the code window go to the "Tools"
menu, and select "References". You'll probably see the
following default references set, although the version
numbers may be different:

1) Visual Basic For Applications
2) Microsoft Access 9.0 Object Library
3) OLE Automation
4) Microsoft ActiveX Data Objects 2.1 Library

If you only need DAO (which I'm guessing is the case) you
may want to remove the cross in the box for "Microsoft
ActiveX Data Objects 2.1 Library" - having both references
can get confusing sometimes. The reference you need to add
is "Microsoft DAO 3.6 Object Library" (or the latest
version you can find), and if you scroll down the list you
should be able to find it. When you do put a cross in the
check box and click the "OK" button.

Hopefully as if by magic your code should compile OK. :)

Hope this helps,

Stuart

Quote:
>-----Original Message-----
>I'm having trouble adding a new record to my subform.  I
>get a "User defined type not defined" message and
>highlights the first line of my code.  I don't know alot
>about codes and modules, so any clues would be great.

>Sub WriteAuditUpdate (txtTableName, lngRecordNum,
>txtFieldName, OrgValue, CurValue)
>Dim db As Database
>Dim rs As Recordset
>Set db = CurrentDb
>Set rs = db.OpenRecordset ("AuditTable")

>.



Sun, 26 Jun 2005 01:38:10 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DBGrid Delete Key function not working on some DBGrids while it works on others

2. Dlookup Function not working

3. function not working

4. Replace Function not working

5. Record Count function not working.

6. SkipHolidays Function not working Access97

7. functions not working

8. TransferText method in function does not working correctly

9. A97...User defined function not working in recordset

10. Date-function not working

11. Custom function not working in parameter query

12. mailto: function for hyperlinks not working

 

 
Powered by phpBB® Forum Software