Audit Trail / Error 3251

g28dman

Registered User.
Local time
Today, 06:52
Joined
Nov 4, 2005
Messages
84
I hate to bring another Audit Trail question to the table, but I am scratching my head for thelast day trying to get to get this work.

Link to original post:
http://www.access-programmers.co.uk/forums/showthread.php?t=44231&highlight=audit+trail

Problem: I have a main form/subform. The mainform is based on a query of 2 tables with a lookup field. The subform is based on a query referencing the PK for one of the main form's tables.

I have gotten the audit trail to work on the subform, no problems there.

But I get an Error 3251 - Operation is not supported for this type of object.

When I press ok, the record is changed and saved. The memo field logs that a change has been made, but does not list what was changed or what it was changed from.

I have tried the following:
Changing the lookup fields names as Lookup1, Lookup2...etc the changing the line of code to skip those fields along with tbAuditTrail.

I have tried adding a second module named different/changed function name and calling it...no luck

Creating a just a new main form and tring it...zilch

I read something about recordsetclone, but do not know exactly how to add this in the module to try.

Does anyone have any other suggestions/or solutions that I may try?

Thank you
 
Maybe this link will be helpful.

Great, I never saw this before, now I am thinking that my database, which i have loved and nourished for two years is now going to bite my butt.:(
 
Using ComboBoxes on forms is just fine but putting Lookup fields in tables has a tendancy to confuse the "programmer" as they hide the real value that is in the field.
 
I am now a bit confused. I used the Lookup wizard on my tables to establish the foreign key, is this not the correct procedure? Should I have set relationships on the screen where it shows the relationships and types?

I modeled my db's main data entry form after northwind's orders form. I just tried the audit trail on there, and sure enough - Error 3251.

So I guess I am stuck on exactly what I need to do :confused:
 
You should establish your relationships in the Tools>Relationships... area of the mdb with the tables. If there is a 1:many relationship and you use a Form and SubForm to display the two tables, Access will maintain the ForeignKey for you if that is the LinkChild/MasterFields. Normally you would get the FK field started and then turn on ReferentialIntegrity and let Access do the rest. Here's a link for you: Referential Integrity can't be that easy!
 
Thanks for the link. I think I know what must be done. I have a question though which I am sure you'll know. Is there a way to get the same effect on a data entry form as what is on northwind?

I realize know that may tables are not exactly set up right with the look ups, and I have spent 100s of hours upto this point on this project. I thought I was close to marketing, but now will put that on hold.

The problem is I dont want to rebuild my tables from scratch as my db is being used by my business in 3 locations and has a year of data are ready built in.

I included in the build the backend utility that's on roger's library, and think I can make the necessary adjustments with out any major overhaul to the backends.

Which leads me back to my question...My form uses a lookup field to update the mainform's information with the client's personal information, I use the SSN/EIN for this and would still like to incorporate this feature, while including the audit trail.

thank you for your feedback
gerald
 
I'm sorry Gerald but I do not really understand what it is you want. Maybe if you described it in different words.
 
Sorry...I guess it wouldve helped if I mentioned the form name on northwind. The form I make reference to is the orders form, in which the user may use a drop down box in order to select a customer based on name. When a name is selected it auto fills the contact information and other information on the form.

My form in which I am trying to use the audit trail is based off this except it is using the customer's SSN/EIN number.

Is there a way to populate the contact information of the user without using a combo box looking up the record, so I can incorporate the audit trail into the form?
-------------------------------------------------------------------------------------------------------------------------------------------------
You know, I think I might be able to edit a search form, and when the user clicks on the name it loads it in as a new record? Now if I could just get that going, I might just get it...
 
Last edited:
Gerald, are you aware of the .Column property of a ComboBox? It allows you to reference the value in a column. For example you could copy the value in the 2nd column of the ComboBox with:
Me.OtherControl = Me.ComboBox.Column(1) ...using your control names of course. The index value is zero based so that (1) is the second column.
 
Tony those were great videos! Do you think I could be able to also use the audit trail by doing these changes?

thanks
gerald

I don't know Gerald, I haven't done anything with Audit trail for over a year now, I'm very rusty! I do know there is an extensive thread within this forum on Audit trail as I submitted a solution of my own, which I'm not entirely happy with, in other words I am going to revisit it. I'm sure you have found this thread however if you haven't let me know and I will try and locate it.
 
Ok, thanks - I will give it a shot and let you know, will be this evening before I update. Thanks again for the link to your tips page.

***Edit***
I ended up having to do the solution OOI posted on the audit trail thread. Change my lookup field's name.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom